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] [day] [month] [year] [list]
Message-ID: <13614e0a-4985-42a1-87b2-a57237437a08@suse.cz>
Date: Fri, 28 Feb 2025 10:59:20 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Brendan Jackman <jackmanb@...gle.com>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: Mel Gorman <mgorman@...hsingularity.net>, Michal Hocko
 <mhocko@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 Yosry Ahmed <yosry.ahmed@...ux.dev>
Subject: Re: [PATCH v4 2/2] mm/page_alloc: Clarify should_claim_block()
 commentary

On 2/28/25 10:52, Brendan Jackman wrote:
> There's lots of text here but it's a little hard to follow, this is an
> attempt to break it up and align its structure more closely with the
> code.
> 
> Reword the top-level function comment to just explain what question the
> function answers from the point of view of the caller.
> 
> Break up the internal logic into different sections that can have their
> own commentary describing why that part of the rationale is present.
> 
> Note the page_group_by_mobility_disabled logic is not explained in the
> commentary, that is outside the scope of this patch...
> 
> Signed-off-by: Brendan Jackman <jackmanb@...gle.com>

Reviewed-by: Vlastimil Babka <vbabka@...e.cz>

> +	/*
> +	 * Unmovable/reclaimable allocations would cause permanent
> +	 * fragmentations if they fell back to allocating from a movable block
> +	 * (polluting it), so we try to claim the whole block regardless of the
> +	 * allocation size. Later movable allocations can always steal from this
> +	 * block, which is less problematic.
> +	 */
> +	if (start_mt == MIGRATE_RECLAIMABLE || start_mt == MIGRATE_UNMOVABLE)
> +		return true;
> +
> +	if (page_group_by_mobility_disabled)
> +		return true;
> +
> +	/*
> +	 * Movable pages won't cause permanent fragmentation, so when you alloc

s/you/we/ for consistency? I think Andrew can amend locally to avoid resend.

Thanks.

> +	 * small pages, we just need to temporarily steal unmovable or
> +	 * reclaimable pages that are closest to the request size. After a
> +	 * while, memory compaction may occur to form large contiguous pages,
> +	 * and the next movable allocation may not need to steal.
> +	 */
>  	return false;
>  }
>  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ