lkml.org 
[lkml]   [2021]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/6 v2] Calculate pcp->high based on zone sizes and active CPUs
From
Date
On 5/28/21 1:55 AM, Mel Gorman wrote:
> - * onlined.
> - */
> - nr_local_cpus = max(1U, cpumask_weight(cpumask_of_node(zone_to_nid(zone)))) + cpu_online;
> - high = total_pages / nr_local_cpus;
> + * onlined. For memory nodes that have no CPUs, split pcp->high across
> + * all online CPUs to mitigate the risk that reclaim is triggered
> + * prematurely due to pages stored on pcp lists.
> + */
> + nr_split_cpus = cpumask_weight(cpumask_of_node(zone_to_nid(zone))) + cpu_online;
> + if (!nr_split_cpus)
> + nr_split_cpus = num_online_cpus();
> + high = total_pages / nr_split_cpus;

Updated version looks fine to me, thanks!

BTW, to do some of this testing, Feng was doing a plain old kernel
build. On the one system where this got run, he noted a ~2% regression
in build times. Nothing major, but you might want to be on the lookout
in case 0day or the other test harnesses find something similar once
this series gets to them.

Acked-by: Dave Hansen <dave.hansen@intel.com>

\
 
 \ /
  Last update: 2021-05-28 16:39    [W:0.083 / U:3.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site