linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zi Yan <ziy@nvidia.com>
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Oscar Salvador <osalvador@suse.de>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>,
	Richard Chang <richardycc@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 0/6] Make MIGRATE_ISOLATE a standalone bit
Date: Mon, 16 Jun 2025 18:37:55 -0700	[thread overview]
Message-ID: <20250616183755.16fbdd5e867752db14e321cc@linux-foundation.org> (raw)
In-Reply-To: <20250616121019.1925851-1-ziy@nvidia.com>

On Mon, 16 Jun 2025 08:10:13 -0400 Zi Yan <ziy@nvidia.com> wrote:

> Hi all,
> 
> This patchset moves MIGRATE_ISOLATE to a standalone bit to avoid
> being overwritten during pageblock isolation process. Currently,
> MIGRATE_ISOLATE is part of enum migratetype (in include/linux/mmzone.h),
> thus, setting a pageblock to MIGRATE_ISOLATE overwrites its original
> migratetype. This causes pageblock migratetype loss during
> alloc_contig_range() and memory offline, especially when the process
> fails due to a failed pageblock isolation and the code tries to undo the
> finished pageblock isolations.
> 
> It is on top of mm-everything-2025-06-15-23-48.

mm-new would be a better target.  mm-new is not (yet) included in
linux-next, hence it is not in mm-everything.

I hit a few issues (x86_64 allmodconfig):

In file included from ./include/linux/slab.h:16,
                 from ./include/linux/irq.h:21,
                 from ./include/linux/of_irq.h:7,
                 from drivers/gpu/drm/msm/hdmi/hdmi.c:9:
./include/linux/gfp.h:428:25: error: expected identifier before '(' token
  428 | #define ACR_NONE        ((__force acr_flags_t)0)        // ordinary allocation request
      |                         ^
drivers/gpu/drm/msm/generated/hdmi.xml.h:71:9: note: in expansion of macro 'ACR_NONE'
   71 |         ACR_NONE = 0,
      |         ^~~~~~~~



And this was needed:

kernel/kexec_handover.c uses set_pageblock_migratetype()

--- a/include/linux/page-isolation.h~mm-page_isolation-remove-migratetype-from-move_freepages_block_isolate-fix
+++ a/include/linux/page-isolation.h
@@ -45,6 +45,8 @@ void __meminit init_pageblock_migratetyp
 					  enum migratetype migratetype,
 					  bool isolate);
 
+void set_pageblock_migratetype(struct page *page, enum migratetype migratetype);
+
 bool pageblock_isolate_and_move_free_pages(struct zone *zone, struct page *page);
 bool pageblock_unisolate_and_move_free_pages(struct zone *zone, struct page *page);
 
--- a/mm/page_alloc.c~mm-page_isolation-remove-migratetype-from-move_freepages_block_isolate-fix
+++ a/mm/page_alloc.c
@@ -525,8 +525,7 @@ void clear_pfnblock_bit(const struct pag
  * @page: The page within the block of interest
  * @migratetype: migratetype to set
  */
-static void set_pageblock_migratetype(struct page *page,
-				      enum migratetype migratetype)
+void set_pageblock_migratetype(struct page *page, enum migratetype migratetype)
 {
 	if (unlikely(page_group_by_mobility_disabled &&
 		     migratetype < MIGRATE_PCPTYPES))
_



  parent reply	other threads:[~2025-06-17  1:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 12:10 Zi Yan
2025-06-16 12:10 ` [PATCH v9 1/6] mm/page_alloc: pageblock flags functions clean up Zi Yan
2025-06-16 12:10 ` [PATCH v9 2/6] mm/page_isolation: make page isolation a standalone bit Zi Yan
2025-06-16 12:10 ` [PATCH v9 3/6] mm/page_alloc: add support for initializing pageblock as isolated Zi Yan
2025-06-16 12:10 ` [PATCH v9 4/6] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2025-06-16 12:10 ` [PATCH v9 5/6] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2025-06-16 12:10 ` [PATCH v9 6/6] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2025-06-17  1:37 ` Andrew Morton [this message]
2025-06-17  1:38   ` [PATCH v9 0/6] Make MIGRATE_ISOLATE a standalone bit Zi Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250616183755.16fbdd5e867752db14e321cc@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=richardycc@google.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox