lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5d0eb99-bd1d-4350-a6f5-367a870b2d5c@kernel.org>
Date: Tue, 6 Jan 2026 21:25:45 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Tianyou Li <tianyou.li@...el.com>, Oscar Salvador <osalvador@...e.de>,
 Mike Rapoport <rppt@...nel.org>, Wei Yang <richard.weiyang@...il.com>
Cc: linux-mm@...ck.org, Yong Hu <yong.hu@...el.com>,
 Nanhai Zou <nanhai.zou@...el.com>, Yuan Liu <yuan1.liu@...el.com>,
 Tim Chen <tim.c.chen@...ux.intel.com>, Qiuxu Zhuo <qiuxu.zhuo@...el.com>,
 Yu C Chen <yu.c.chen@...el.com>, Pan Deng <pan.deng@...el.com>,
 Chen Zhang <zhangchen.kidd@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/2] mm/memory hotplug/unplug: Optimize
 zone->contiguous update when changes pfn range


One more thing, the fact that the clear_zone_contiguous() happens in 
move_pfn_range_to_zone() is a bit suboptimal.

Maybe we need a comment here like

/*
  * Calculate the new zone contig state before move_pfn_range_to_zone()
  * sets the zone temporarily to non-contiguous.
  */

Or something like that.

Alternatively, we have to rework the code a bit that this dependency is 
a bit clearer.

> +	new_contiguous_state = zone_contig_state_after_growing(zone, pfn, nr_pages);
>   
>   	/* associate pfn range with the zone */
>   	move_pfn_range_to_zone(zone, pfn, nr_pages, NULL, MIGRATE_MOVABLE,
> @@ -1204,7 +1273,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages,
>   	}
>   
>   	online_pages_range(pfn, nr_pages);
> -	set_zone_contiguous(zone);
> +	set_zone_contiguous(zone, new_contiguous_state);
>   	adjust_present_page_count(pfn_to_page(pfn), group, nr_pages);

-- 
Cheers

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ