lkml.org 
[lkml]   [2021]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/6] mm/page_alloc: Limit the number of pages on PCP lists when reclaim is active
From
Date
On 5/21/21 3:28 AM, Mel Gorman wrote:
> +static int nr_pcp_high(struct per_cpu_pages *pcp, struct zone *zone)
> +{
> + int high = READ_ONCE(pcp->high);
> +
> + if (unlikely(!high))
> + return 0;
> +
> + if (!test_bit(ZONE_RECLAIM_ACTIVE, &zone->flags))
> + return high;
> +
> + /*
> + * If reclaim is active, limit the number of pages that can be
> + * stored on pcp lists
> + */
> + return READ_ONCE(pcp->batch) << 2;
> +}

Should there be a sanity check on this? Let's say we had one of those
weirdo zones with tons of CPUs and a small low_wmark_pages(). Could we
have a case where:

pcp->high < pcp->batch<<2

and this effectively *raises* nr_pcp_high()?

It's not possible with the current pcp->high calculation, but does
anything prevent it now?

\
 
 \ /
  Last update: 2021-05-22 00:45    [W:0.148 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site