mm/page_alloc: remove the throttling logic from the page allocator
authorMel Gorman <mgorman@techsingularity.net>
Fri, 5 Nov 2021 20:42:38 +0000 (13:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:40 +0000 (13:30 -0700)
The page allocator stalls based on the number of pages that are waiting
for writeback to start but this should now be redundant.
shrink_inactive_list() will wake flusher threads if the LRU tail are
unqueued dirty pages so the flusher should be active.  If it fails to
make progress due to pages under writeback not being completed quickly
then it should stall on VMSCAN_THROTTLE_WRITEBACK.

Link: https://lkml.kernel.org/r/20211022144651.19914-6-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: "Darrick J . Wong" <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Rik van Riel <riel@surriel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c

index 0f1f1f3532117bf60af99e4dfa8b2a9b7caf3a9e..0f74a66bed191d109ae8c8d02051d16d0e9f7579 100644 (file)
@@ -4791,30 +4791,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
                trace_reclaim_retry_zone(z, order, reclaimable,
                                available, min_wmark, *no_progress_loops, wmark);
                if (wmark) {
-                       /*
-                        * If we didn't make any progress and have a lot of
-                        * dirty + writeback pages then we should wait for
-                        * an IO to complete to slow down the reclaim and
-                        * prevent from pre mature OOM
-                        */
-                       if (!did_some_progress) {
-                               unsigned long write_pending;
-
-                               write_pending = zone_page_state_snapshot(zone,
-                                                       NR_ZONE_WRITE_PENDING);
-
-                               if (2 * write_pending > reclaimable) {
-                                       congestion_wait(BLK_RW_ASYNC, HZ/10);
-                                       return true;
-                               }
-                       }
-
                        ret = true;
-                       goto out;
+                       break;
                }
        }
 
-out:
        /*
         * Memory allocation/reclaim might be called from a WQ context and the
         * current implementation of the WQ concurrency control doesn't