Commit 59149bf8 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Andrew Morton

mm: accept to promo watermark

Commit c574bbe9 ("NUMA balancing: optimize page placement for memory
tiering system") introduced a new watermark above "high" -- "promo".

Accept memory memory to the highest watermark which is WMARK_PROMO now.

Link: https://lkml.kernel.org/r/20240809114854.3745464-9-kirill.shutemov@linux.intel.comSigned-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e44dd9b1
...@@ -7001,8 +7001,8 @@ static bool cond_accept_memory(struct zone *zone, unsigned int order) ...@@ -7001,8 +7001,8 @@ static bool cond_accept_memory(struct zone *zone, unsigned int order)
if (list_empty(&zone->unaccepted_pages)) if (list_empty(&zone->unaccepted_pages))
return false; return false;
/* How much to accept to get to high watermark? */ /* How much to accept to get to promo watermark? */
to_accept = high_wmark_pages(zone) - to_accept = promo_wmark_pages(zone) -
(zone_page_state(zone, NR_FREE_PAGES) - (zone_page_state(zone, NR_FREE_PAGES) -
__zone_watermark_unusable_free(zone, order, 0) - __zone_watermark_unusable_free(zone, order, 0) -
zone_page_state(zone, NR_UNACCEPTED)); zone_page_state(zone, NR_UNACCEPTED));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment