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: <20230421142533.nm44wkmh3wkudlqn@techsingularity.net>
Date:   Fri, 21 Apr 2023 15:25:33 +0100
From:   Mel Gorman <mgorman@...hsingularity.net>
To:     Johannes Weiner <hannes@...xchg.org>
Cc:     linux-mm@...ck.org, Kaiyang Zhao <kaiyang2@...cmu.edu>,
        Vlastimil Babka <vbabka@...e.cz>,
        David Rientjes <rientjes@...gle.com>,
        linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [RFC PATCH 11/26] mm: page_alloc: introduce MIGRATE_FREE

On Tue, Apr 18, 2023 at 03:12:58PM -0400, Johannes Weiner wrote:
> To cut down on type mixing, put empty pageblocks on separate freelists
> and make them the first fallback preference before stealing space from
> incompatible blocks.
> 
> The neutral block designation will also be handy in subsequent patches
> that: simplify compaction; add per-mt freelist counts and make
> compaction_suitable() more precise; and ultimately make pageblocks the
> basis of free memory management.
> 

This patch is a line in the sand for the series. Patches 1-10 can stand
alone with supporting data because this is the first major change that
has a material impact on fragmentation avoidance and its overhead.

Maybe there is something in the later patches that makes the need for this
patch more obvious but putting the empty pageblocks on separate freelists
is not that helpful in itself. The main problem is that __rmqueue() starts
with __rmqueue_smallest which for huge pages is probably fine because
it searches first for free pageblocks, but it's not for SLUB high-order
allocations because __rmqueue_smallest for orders < pageblock_order
encourages mixing. Obviously it would also not be fine for contiguous page
allocations for page cache or anything else that is planned. If nothing
else, this patch highlights that fragmentation avoidance was originally
focused on huge pages which was fine at the time, but not any longer.

The need for MIGRATE_FREE type could potentially be avoided by having
__rmqueue() start with __rmqueue_smallest(order == pageblock_order) to
encourage full block usage first before mixing.

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ