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: <F05CF961-6104-4C46-94C2-8966F580D8AC@nvidia.com>
Date: Thu, 08 May 2025 16:23:49 -0400
From: Zi Yan <ziy@...dia.com>
To: Johannes Weiner <hannes@...xchg.org>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
 Oscar Salvador <osalvador@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>,
 "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
 Mel Gorman <mgorman@...hsingularity.net>,
 Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
 Brendan Jackman <jackmanb@...gle.com>, Richard Chang <richardycc@...gle.com>,
 linux-kernel@...r.kernel.org, Zi Yan <ziy@...dia.com>
Subject: Re: [PATCH v3 2/4] mm/page_isolation: remove migratetype from
 move_freepages_block_isolate()

On 7 May 2025, at 17:10, Zi Yan wrote:

> Since migratetype is no longer overwritten during pageblock isolation,
> moving pageblocks to and from MIGRATE_ISOLATE no longer needs migratetype.
>
> Add MIGRATETYPE_NO_ISO_MASK to allow read before-isolation migratetype
> when a pageblock is isolated. It is used by move_freepages_block_isolate().
>
> Add pageblock_isolate_and_move_free_pages() and
> pageblock_unisolate_and_move_free_pages() to be explicit about the page
> isolation operations. Both share the common code in
> __move_freepages_block_isolate(), which is renamed from
> move_freepages_block_isolate().
>
> Signed-off-by: Zi Yan <ziy@...dia.com>
> ---
>  include/linux/mmzone.h         |  4 ++-
>  include/linux/page-isolation.h |  4 +--
>  mm/page_alloc.c                | 49 +++++++++++++++++++++++++++-------
>  mm/page_isolation.c            | 21 +++++++--------
>  4 files changed, 55 insertions(+), 23 deletions(-)
>

Here is the fixup 2/3 to address Johannes’ comments.

>From 4e6fddf64c07da8796ff6ca90703a5aa64302a90 Mon Sep 17 00:00:00 2001
From: Zi Yan <ziy@...dia.com>
Date: Thu, 8 May 2025 15:23:42 -0400
Subject: [PATCH] fixup for mm/page_isolation: remove migratetype from
 move_freepages_block_isolate()

1. replace get_pageblock_isolate() with
   get_pageblock_migratetype() == MIGRATE_ISOLATE, a
   get_pageblock_isolate() becomes private in mm/page_isolation.c

Signed-off-by: Zi Yan <ziy@...dia.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b502e4a3afbe..c99b77fdf383 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1975,7 +1975,7 @@ static bool __move_freepages_block_isolate(struct zone *zone,
 	int from_mt;
 	int to_mt;

-	if (isolate == get_pageblock_isolate(page))
+	if (isolate == (get_pageblock_migratetype(page) == MIGRATE_ISOLATE))
 		return false;

 	if (!prep_move_freepages_block(zone, page, &start_pfn, NULL, NULL))
-- 
2.47.2


Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ