Re: [PATCH 6/6] mm/page_alloc: Introduce vm.percpu_pagelist_high_fraction

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

 



On Fri, 21 May 2021 11:28:26 +0100 Mel Gorman wrote:
> /*
>  * Calculate and set new high and batch values for all per-cpu pagesets of a
>- * zone based on the zone's size.
>+ * zone based on the zone's size and the percpu_pagelist_high_fraction sysctl.
>  */

It is the comment fitting zone_highsize() more.

> static void zone_set_pageset_high_and_batch(struct zone *zone, int cpu_online)
> {
> 	int new_high, new_batch;
> 
>+	if (!percpu_pagelist_high_fraction) {
>+		new_high = zone_highsize(zone, low_wmark_pages(zone), cpu_online);
>+	} else {
>+		new_high = zone_highsize(zone,
>+			zone_managed_pages(zone) / percpu_pagelist_high_fraction,
>+			cpu_online);
>+	}
>+

Nit, move percpu_pagelist_high_fraction into zone_highsize() instead of
cluttering up here because

>+The batch value of each per cpu pagelist remains the same regardless of the
>+value of the high fraction so allocation latencies are unaffected.




[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