Re: [PATCH 0/6 v2] Calculate pcp->high based on zone sizes and active CPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux