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: <56683268-92C8-4FAE-9BAF-645C35227F24@nvidia.com>
Date: Mon, 02 Jun 2025 21:56:04 -0400
From: Zi Yan <ziy@...dia.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
 David Hildenbrand <david@...hat.com>, Johannes Weiner <hannes@...xchg.org>,
 Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org
Cc: Oscar Salvador <osalvador@...e.de>,
 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 v8 3/6] mm/page_alloc: add support for initializing
 pageblock as isolated.

On 2 Jun 2025, at 19:52, Zi Yan wrote:

> MIGRATE_ISOLATE is a standalone bit, so a pageblock cannot be initialized
> to just MIGRATE_ISOLATE. Add init_pageblock_migratetype() to enable
> initialize a pageblock with a migratetype and isolated.
>
> Signed-off-by: Zi Yan <ziy@...dia.com>
> Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
> Acked-by: David Hildenbrand <david@...hat.com>
> ---
>  include/linux/memory_hotplug.h |  3 ++-
>  include/linux/page-isolation.h |  3 +++
>  mm/hugetlb.c                   |  4 ++--
>  mm/internal.h                  |  3 ++-
>  mm/memory_hotplug.c            | 12 ++++++++----
>  mm/memremap.c                  |  2 +-
>  mm/mm_init.c                   | 24 +++++++++++++++---------
>  mm/page_alloc.c                | 24 ++++++++++++++++++++++++
>  8 files changed, 57 insertions(+), 18 deletions(-)



>From 0e48cfc8fc9e10c1d2fe9bc080af737b4f852347 Mon Sep 17 00:00:00 2001
From: Zi Yan <ziy@...dia.com>
Date: Mon, 2 Jun 2025 21:51:25 -0400
Subject: [PATCH] fixup: make init_pageblock_migratetype() set right
 migratetype.

when page_group_by_mobility_disabled is 1.

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

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0867e2b2e187..ff098523a501 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -552,12 +552,14 @@ void __meminit init_pageblock_migratetype(struct page *page,
 					  enum migratetype migratetype,
 					  bool isolate)
 {
-	unsigned long flags = migratetype;
+	unsigned long flags;

 	if (unlikely(page_group_by_mobility_disabled &&
 		     migratetype < MIGRATE_PCPTYPES))
 		migratetype = MIGRATE_UNMOVABLE;

+	flags = migratetype;
+
 #ifdef CONFIG_MEMORY_ISOLATION
 	if (migratetype == MIGRATE_ISOLATE) {
 		VM_WARN_ONCE(
-- 
2.47.2




Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ