cond_accept_memory() accepts memory until the zone is back at its promo watermark. Rename it to accept_memory_to_wmark() to say what it does. No functional change. Signed-off-by: Pankaj Gupta --- mm/page_alloc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2fef4092c913..adba323ba894 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -299,8 +299,8 @@ EXPORT_SYMBOL(nr_online_nodes); static unsigned long alloc_stall_warn_jiffies = INITIAL_JIFFIES; static bool page_contains_unaccepted(struct page *page, unsigned int order); -static bool cond_accept_memory(struct zone *zone, unsigned int order, - int alloc_flags); +static bool accept_memory_to_wmark(struct zone *zone, unsigned int order, + int alloc_flags); static bool __free_unaccepted(struct page *page); int page_group_by_mobility_disabled __read_mostly; @@ -3902,7 +3902,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, continue; } - cond_accept_memory(zone, order, alloc_flags); + accept_memory_to_wmark(zone, order, alloc_flags); /* * Detect whether the number of free pages is below high @@ -3927,7 +3927,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, if (!zone_watermark_fast(zone, order, mark, ac->highest_zoneidx, alloc_flags, gfp_mask)) { - if (cond_accept_memory(zone, order, alloc_flags)) + if (accept_memory_to_wmark(zone, order, alloc_flags)) goto try_this_zone; /* @@ -3964,7 +3964,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, return page; } else { - if (cond_accept_memory(zone, order, alloc_flags)) + if (accept_memory_to_wmark(zone, order, alloc_flags)) goto try_this_zone; /* Try again if zone has deferred pages */ @@ -5286,7 +5286,7 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, goto failed; } - cond_accept_memory(zone, 0, alloc_flags); + accept_memory_to_wmark(zone, 0, alloc_flags); retry_this_zone: mark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK) + nr_pages - nr_populated; if (zone_watermark_fast(zone, 0, mark, @@ -5295,7 +5295,7 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, break; } - if (cond_accept_memory(zone, 0, alloc_flags)) + if (accept_memory_to_wmark(zone, 0, alloc_flags)) goto retry_this_zone; /* Try again if zone has deferred pages */ @@ -8037,8 +8037,8 @@ static bool try_to_accept_memory_one(struct zone *zone) return true; } -static bool cond_accept_memory(struct zone *zone, unsigned int order, - int alloc_flags) +static bool accept_memory_to_wmark(struct zone *zone, unsigned int order, + int alloc_flags) { long to_accept, wmark; bool ret = false; @@ -8101,8 +8101,8 @@ static bool page_contains_unaccepted(struct page *page, unsigned int order) return false; } -static bool cond_accept_memory(struct zone *zone, unsigned int order, - int alloc_flags) +static bool accept_memory_to_wmark(struct zone *zone, unsigned int order, + int alloc_flags) { return false; } -- 2.34.1