Re: [PATCH] mm, page_alloc: skip zone who has no managed_pages in calculate_totalreserve_pages()

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

 



On Mon 12-11-18 15:14:04, Wei Yang wrote:
> Zone with no managed_pages doesn't contribute totalreserv_pages. And the
> more nodes we have, the more empty zones there are.
> 
> This patch skip the zones to save some cycles.

What is the motivation for the patch? Does it really cause any
measurable difference in performance?

> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
> ---
>  mm/page_alloc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index a919ba5cb3c8..567de15e1106 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -7246,6 +7246,9 @@ static void calculate_totalreserve_pages(void)
>  			struct zone *zone = pgdat->node_zones + i;
>  			long max = 0;
>  
> +			if (!managed_zone(zone))
> +				continue;
> +
>  			/* Find valid and maximum lowmem_reserve in the zone */
>  			for (j = i; j < MAX_NR_ZONES; j++) {
>  				if (zone->lowmem_reserve[j] > max)
> -- 
> 2.15.1
> 

-- 
Michal Hocko
SUSE Labs




[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