mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHv2 0/8] mm: Fix several issues with unaccepted memory
@ 2024-08-09 11:48 Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 1/8] mm: Fix endless reclaim on machines " Kirill A. Shutemov
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

The patchset addresses several issues related to unaccepted memory.

It replaces "mm: fix endless reclaim on machines with unaccepted
memory" commit which is in mm-unstable now.

The most severe issue is a kswapd hang, which is fixed by patch 1/8.

Pach 2/8 preparatory cleanup.

Patch 3/8 ensures that __alloc_pages_bulk() will not exhaust all
accepted memory without accepting more.

Patches 4/8-6/8 are preparations for patch 7/8, which fixes
alloc_config_page() on machines with unaccepted memory. This allows, for
example, the allocation of gigantic pages at runtime.

Patch 8/8 enable the kernel to accept memory up to the promo watermark.

I believe only the first patch deserves backporting.

Please review. Any feedback is welcome.

Kirill A. Shutemov (8):
  mm: Fix endless reclaim on machines with unaccepted memory
  mm: Reduce deferred struct page init ifdeffery
  mm: Accept memory in __alloc_pages_bulk().
  mm: Introduce PageUnaccepted() page type
  mm: Rework accept memory helpers
  mm: Add a helper to accept page
  mm: page_isolation: Handle unaccepted memory isolation
  mm: Accept to promo watermark

 arch/x86/boot/compressed/misc.c               |   2 +-
 arch/x86/boot/compressed/misc.h               |   2 +-
 drivers/firmware/efi/libstub/efistub.h        |   2 +-
 .../firmware/efi/libstub/unaccepted_memory.c  |   3 +-
 drivers/firmware/efi/unaccepted_memory.c      |  18 +--
 include/linux/mm.h                            |  12 +-
 include/linux/page-flags.h                    |   8 ++
 mm/internal.h                                 |   8 ++
 mm/memblock.c                                 |   2 +-
 mm/mm_init.c                                  |   2 +-
 mm/page_alloc.c                               | 128 ++++++++++--------
 mm/page_isolation.c                           |   8 ++
 tools/testing/memblock/internal.h             |   2 +-
 13 files changed, 122 insertions(+), 75 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 1/8] mm: Fix endless reclaim on machines with unaccepted memory
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-12 22:12   ` Jianxiong Gao
  2024-08-09 11:48 ` [PATCHv2 2/8] mm: Reduce deferred struct page init ifdeffery Kirill A. Shutemov
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov, Jianxiong Gao, stable

Unaccepted memory is considered unusable free memory, which is not
counted as free on the zone watermark check. This causes
get_page_from_freelist() to accept more memory to hit the high
watermark, but it creates problems in the reclaim path.

The reclaim path encounters a failed zone watermark check and attempts
to reclaim memory. This is usually successful, but if there is little or
no reclaimable memory, it can result in endless reclaim with little to
no progress. This can occur early in the boot process, just after start
of the init process when the only reclaimable memory is the page cache
of the init executable and its libraries.

Make unaccepted memory free from watermark check point of view. This way
unaccepted memory will never be the trigger of memory reclaim.
Accept more memory in the get_page_from_freelist() if needed.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Jianxiong Gao <jxgao@google.com>
Acked-by: David Hildenbrand <david@redhat.com>
Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
Cc: stable@vger.kernel.org # v6.5+
---
 mm/page_alloc.c | 42 ++++++++++++++++++++----------------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b5f99f4b20a..a9a89980f3f2 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -287,7 +287,7 @@ EXPORT_SYMBOL(nr_online_nodes);
 
 static bool page_contains_unaccepted(struct page *page, unsigned int order);
 static void accept_page(struct page *page, unsigned int order);
-static bool try_to_accept_memory(struct zone *zone, unsigned int order);
+static bool cond_accept_memory(struct zone *zone, unsigned int order);
 static inline bool has_unaccepted_memory(void);
 static bool __free_unaccepted(struct page *page);
 
@@ -3108,9 +3108,6 @@ static inline long __zone_watermark_unusable_free(struct zone *z,
 	if (!(alloc_flags & ALLOC_CMA))
 		unusable_free += zone_page_state(z, NR_FREE_CMA_PAGES);
 #endif
-#ifdef CONFIG_UNACCEPTED_MEMORY
-	unusable_free += zone_page_state(z, NR_UNACCEPTED);
-#endif
 
 	return unusable_free;
 }
@@ -3404,6 +3401,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 			}
 		}
 
+		cond_accept_memory(zone, order);
+
 		/*
 		 * Detect whether the number of free pages is below high
 		 * watermark.  If so, we will decrease pcp->high and free
@@ -3429,10 +3428,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 				       gfp_mask)) {
 			int ret;
 
-			if (has_unaccepted_memory()) {
-				if (try_to_accept_memory(zone, order))
-					goto try_this_zone;
-			}
+			if (cond_accept_memory(zone, order))
+				goto try_this_zone;
 
 #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 			/*
@@ -3486,10 +3483,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 
 			return page;
 		} else {
-			if (has_unaccepted_memory()) {
-				if (try_to_accept_memory(zone, order))
-					goto try_this_zone;
-			}
+			if (cond_accept_memory(zone, order))
+				goto try_this_zone;
 
 #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 			/* Try again if zone has deferred pages */
@@ -6988,9 +6983,6 @@ static bool try_to_accept_memory_one(struct zone *zone)
 	struct page *page;
 	bool last;
 
-	if (list_empty(&zone->unaccepted_pages))
-		return false;
-
 	spin_lock_irqsave(&zone->lock, flags);
 	page = list_first_entry_or_null(&zone->unaccepted_pages,
 					struct page, lru);
@@ -7016,23 +7008,29 @@ static bool try_to_accept_memory_one(struct zone *zone)
 	return true;
 }
 
-static bool try_to_accept_memory(struct zone *zone, unsigned int order)
+static bool cond_accept_memory(struct zone *zone, unsigned int order)
 {
 	long to_accept;
-	int ret = false;
+	bool ret = false;
+
+	if (!has_unaccepted_memory())
+		return false;
+
+	if (list_empty(&zone->unaccepted_pages))
+		return false;
 
 	/* How much to accept to get to high watermark? */
 	to_accept = high_wmark_pages(zone) -
 		    (zone_page_state(zone, NR_FREE_PAGES) -
-		    __zone_watermark_unusable_free(zone, order, 0));
+		    __zone_watermark_unusable_free(zone, order, 0) -
+		    zone_page_state(zone, NR_UNACCEPTED));
 
-	/* Accept at least one page */
-	do {
+	while (to_accept > 0) {
 		if (!try_to_accept_memory_one(zone))
 			break;
 		ret = true;
 		to_accept -= MAX_ORDER_NR_PAGES;
-	} while (to_accept > 0);
+	}
 
 	return ret;
 }
@@ -7075,7 +7073,7 @@ static void accept_page(struct page *page, unsigned int order)
 {
 }
 
-static bool try_to_accept_memory(struct zone *zone, unsigned int order)
+static bool cond_accept_memory(struct zone *zone, unsigned int order)
 {
 	return false;
 }
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 2/8] mm: Reduce deferred struct page init ifdeffery
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 1/8] mm: Fix endless reclaim on machines " Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk() Kirill A. Shutemov
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Add dummy _deferred_grow_zone() for !DEFERRED_STRUCT_PAGE_INIT and
remove #ifdefs in two places.

No functional changes.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggested-by: David Hildenbrand <david@redhat.com>
---
 mm/page_alloc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a9a89980f3f2..f7bb885aab07 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -322,6 +322,11 @@ static inline bool deferred_pages_enabled(void)
 {
 	return false;
 }
+
+static inline bool _deferred_grow_zone(struct zone *zone, unsigned int order)
+{
+	return false;
+}
 #endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
 
 /* Return a pointer to the bitmap storing bits affecting a block of pages */
@@ -3431,7 +3436,6 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 			if (cond_accept_memory(zone, order))
 				goto try_this_zone;
 
-#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 			/*
 			 * Watermark failed for this zone, but see if we can
 			 * grow this zone if it contains deferred pages.
@@ -3440,7 +3444,6 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 				if (_deferred_grow_zone(zone, order))
 					goto try_this_zone;
 			}
-#endif
 			/* Checked here to keep the fast path fast */
 			BUILD_BUG_ON(ALLOC_NO_WATERMARKS < NR_WMARK);
 			if (alloc_flags & ALLOC_NO_WATERMARKS)
@@ -3486,13 +3489,11 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 			if (cond_accept_memory(zone, order))
 				goto try_this_zone;
 
-#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 			/* Try again if zone has deferred pages */
 			if (deferred_pages_enabled()) {
 				if (_deferred_grow_zone(zone, order))
 					goto try_this_zone;
 			}
-#endif
 		}
 	}
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk().
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 1/8] mm: Fix endless reclaim on machines " Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 2/8] mm: Reduce deferred struct page init ifdeffery Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 15:31   ` Tom Lendacky
  2024-08-09 11:48 ` [PATCHv2 4/8] mm: Introduce PageUnaccepted() page type Kirill A. Shutemov
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Currently, the kernel only accepts memory in get_page_from_freelist(),
but there is another path that directly takes pages from free lists -
__alloc_page_bulk(). This function can consume all accepted memory and
will resort to __alloc_pages_noprof() if necessary.

Conditionally accepted in __alloc_pages_bulk().

The same issue may arise due to deferred page initialization. Kick the
deferred initialization machinery before abandoning the zone, as the
kernel does in get_page_from_freelist().

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Hildenbrand <david@redhat.com>
---
 mm/page_alloc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f7bb885aab07..ed62ecd6775f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4613,12 +4613,23 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid,
 			goto failed;
 		}
 
+		cond_accept_memory(zone, 0);
+retry_this_zone:
 		mark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK) + nr_pages;
 		if (zone_watermark_fast(zone, 0,  mark,
 				zonelist_zone_idx(ac.preferred_zoneref),
 				alloc_flags, gfp)) {
 			break;
 		}
+
+		if (cond_accept_memory(zone, 0))
+			goto retry_this_zone;
+
+		/* Try again if zone has deferred pages */
+		if (deferred_pages_enabled()) {
+			if (_deferred_grow_zone(zone, 0))
+				goto retry_this_zone;
+		}
 	}
 
 	/*
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 4/8] mm: Introduce PageUnaccepted() page type
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
                   ` (2 preceding siblings ...)
  2024-08-09 11:48 ` [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk() Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 5/8] mm: Rework accept memory helpers Kirill A. Shutemov
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

The new page type allows physical memory scanners to detect unaccepted
memory and handle it accordingly.

The page type is serialized with zone lock.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Hildenbrand <david@redhat.com>
---
 include/linux/page-flags.h | 8 ++++++++
 mm/page_alloc.c            | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index a0a29bd092f8..17175a328e6b 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -939,6 +939,7 @@ enum pagetype {
 	PG_hugetlb	= 0x04000000,
 	PG_slab		= 0x02000000,
 	PG_zsmalloc	= 0x01000000,
+	PG_unaccepted	= 0x00800000,
 
 	PAGE_TYPE_BASE	= 0x80000000,
 
@@ -1072,6 +1073,13 @@ FOLIO_TEST_FLAG_FALSE(hugetlb)
 
 PAGE_TYPE_OPS(Zsmalloc, zsmalloc, zsmalloc)
 
+/*
+ * Mark pages that has to be accepted before touched for the first time.
+ *
+ * Serialized with zone lock.
+ */
+PAGE_TYPE_OPS(Unaccepted, unaccepted, unaccepted)
+
 /**
  * PageHuge - Determine if the page belongs to hugetlbfs
  * @page: The page to test.
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ed62ecd6775f..f4368c2fa395 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7008,6 +7008,7 @@ static bool try_to_accept_memory_one(struct zone *zone)
 
 	account_freepages(zone, -MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
 	__mod_zone_page_state(zone, NR_UNACCEPTED, -MAX_ORDER_NR_PAGES);
+	__ClearPageUnaccepted(page);
 	spin_unlock_irqrestore(&zone->lock, flags);
 
 	accept_page(page, MAX_PAGE_ORDER);
@@ -7066,6 +7067,7 @@ static bool __free_unaccepted(struct page *page)
 	list_add_tail(&page->lru, &zone->unaccepted_pages);
 	account_freepages(zone, MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
 	__mod_zone_page_state(zone, NR_UNACCEPTED, MAX_ORDER_NR_PAGES);
+	__SetPageUnaccepted(page);
 	spin_unlock_irqrestore(&zone->lock, flags);
 
 	if (first)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 5/8] mm: Rework accept memory helpers
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
                   ` (3 preceding siblings ...)
  2024-08-09 11:48 ` [PATCHv2 4/8] mm: Introduce PageUnaccepted() page type Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 6/8] mm: Add a helper to accept page Kirill A. Shutemov
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Make accept_memory() and range_contains_unaccepted_memory() take 'start'
and 'size' arguments instead of 'start' and 'end'.

Remove accept_page(), replacing it with direct calls to accept_memory().
The accept_page() name is going to be used for a different function.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggested-by: David Hildenbrand <david@redhat.com>
---
 arch/x86/boot/compressed/misc.c               |  2 +-
 arch/x86/boot/compressed/misc.h               |  2 +-
 drivers/firmware/efi/libstub/efistub.h        |  2 +-
 .../firmware/efi/libstub/unaccepted_memory.c  |  3 ++-
 drivers/firmware/efi/unaccepted_memory.c      | 18 ++++++++++--------
 include/linux/mm.h                            | 12 +++++-------
 mm/memblock.c                                 |  2 +-
 mm/mm_init.c                                  |  2 +-
 mm/page_alloc.c                               | 19 +++----------------
 tools/testing/memblock/internal.h             |  2 +-
 10 files changed, 26 insertions(+), 38 deletions(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 944454306ef4..04a35b2c26e9 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -511,7 +511,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
 
 	if (init_unaccepted_memory()) {
 		debug_putstr("Accepting memory... ");
-		accept_memory(__pa(output), __pa(output) + needed_size);
+		accept_memory(__pa(output), needed_size);
 	}
 
 	entry_offset = decompress_kernel(output, virt_addr, error);
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index b353a7be380c..dd8d1a85f671 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -256,6 +256,6 @@ static inline bool init_unaccepted_memory(void) { return false; }
 
 /* Defined in EFI stub */
 extern struct efi_unaccepted_memory *unaccepted_table;
-void accept_memory(phys_addr_t start, phys_addr_t end);
+void accept_memory(phys_addr_t start, unsigned long size);
 
 #endif /* BOOT_COMPRESSED_MISC_H */
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
index d33ccbc4a2c6..685098f9626f 100644
--- a/drivers/firmware/efi/libstub/efistub.h
+++ b/drivers/firmware/efi/libstub/efistub.h
@@ -1229,7 +1229,7 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab);
 efi_status_t allocate_unaccepted_bitmap(__u32 nr_desc,
 					struct efi_boot_memmap *map);
 void process_unaccepted_memory(u64 start, u64 end);
-void accept_memory(phys_addr_t start, phys_addr_t end);
+void accept_memory(phys_addr_t start, unsigned long size);
 void arch_accept_memory(phys_addr_t start, phys_addr_t end);
 
 #endif
diff --git a/drivers/firmware/efi/libstub/unaccepted_memory.c b/drivers/firmware/efi/libstub/unaccepted_memory.c
index c295ea3a6efc..757dbe734a47 100644
--- a/drivers/firmware/efi/libstub/unaccepted_memory.c
+++ b/drivers/firmware/efi/libstub/unaccepted_memory.c
@@ -177,9 +177,10 @@ void process_unaccepted_memory(u64 start, u64 end)
 		   start / unit_size, (end - start) / unit_size);
 }
 
-void accept_memory(phys_addr_t start, phys_addr_t end)
+void accept_memory(phys_addr_t start, unsigned long size)
 {
 	unsigned long range_start, range_end;
+	phys_addr_t end = start + size;
 	unsigned long bitmap_size;
 	u64 unit_size;
 
diff --git a/drivers/firmware/efi/unaccepted_memory.c b/drivers/firmware/efi/unaccepted_memory.c
index 50f6503fe49f..c2c067eff634 100644
--- a/drivers/firmware/efi/unaccepted_memory.c
+++ b/drivers/firmware/efi/unaccepted_memory.c
@@ -30,11 +30,12 @@ static LIST_HEAD(accepting_list);
  *  - memory that is below phys_base;
  *  - memory that is above the memory that addressable by the bitmap;
  */
-void accept_memory(phys_addr_t start, phys_addr_t end)
+void accept_memory(phys_addr_t start, unsigned long size)
 {
 	struct efi_unaccepted_memory *unaccepted;
 	unsigned long range_start, range_end;
 	struct accept_range range, *entry;
+	phys_addr_t end = start + size;
 	unsigned long flags;
 	u64 unit_size;
 
@@ -74,13 +75,13 @@ void accept_memory(phys_addr_t start, phys_addr_t end)
 	 * "guard" page is accepted in addition to the memory that needs to be
 	 * used:
 	 *
-	 * 1. Implicitly extend the range_contains_unaccepted_memory(start, end)
-	 *    checks up to end+unit_size if 'end' is aligned on a unit_size
-	 *    boundary.
+	 * 1. Implicitly extend the range_contains_unaccepted_memory(start, size)
+	 *    checks up to the next unit_size if 'start+size' is aligned on a
+	 *    unit_size boundary.
 	 *
-	 * 2. Implicitly extend accept_memory(start, end) to end+unit_size if
-	 *    'end' is aligned on a unit_size boundary. (immediately following
-	 *    this comment)
+	 * 2. Implicitly extend accept_memory(start, size) to the next unit_size
+	 *    if 'size+end' is aligned on a unit_size boundary. (immediately
+	 *    following this comment)
 	 */
 	if (!(end % unit_size))
 		end += unit_size;
@@ -156,9 +157,10 @@ void accept_memory(phys_addr_t start, phys_addr_t end)
 	spin_unlock_irqrestore(&unaccepted_memory_lock, flags);
 }
 
-bool range_contains_unaccepted_memory(phys_addr_t start, phys_addr_t end)
+bool range_contains_unaccepted_memory(phys_addr_t start, unsigned long size)
 {
 	struct efi_unaccepted_memory *unaccepted;
+	phys_addr_t end = start + size;
 	unsigned long flags;
 	bool ret = false;
 	u64 unit_size;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ee8cea73d415..b1eed30fdc06 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -4062,18 +4062,18 @@ madvise_set_anon_name(struct mm_struct *mm, unsigned long start,
 
 #ifdef CONFIG_UNACCEPTED_MEMORY
 
-bool range_contains_unaccepted_memory(phys_addr_t start, phys_addr_t end);
-void accept_memory(phys_addr_t start, phys_addr_t end);
+bool range_contains_unaccepted_memory(phys_addr_t start, unsigned long size);
+void accept_memory(phys_addr_t start, unsigned long size);
 
 #else
 
 static inline bool range_contains_unaccepted_memory(phys_addr_t start,
-						    phys_addr_t end)
+						    unsigned long size)
 {
 	return false;
 }
 
-static inline void accept_memory(phys_addr_t start, phys_addr_t end)
+static inline void accept_memory(phys_addr_t start, unsigned long size)
 {
 }
 
@@ -4081,9 +4081,7 @@ static inline void accept_memory(phys_addr_t start, phys_addr_t end)
 
 static inline bool pfn_is_unaccepted_memory(unsigned long pfn)
 {
-	phys_addr_t paddr = pfn << PAGE_SHIFT;
-
-	return range_contains_unaccepted_memory(paddr, paddr + PAGE_SIZE);
+	return range_contains_unaccepted_memory(pfn << PAGE_SHIFT, PAGE_SIZE);
 }
 
 void vma_pgtable_walk_begin(struct vm_area_struct *vma);
diff --git a/mm/memblock.c b/mm/memblock.c
index 3b9dc2d89b8a..0a77a748a8eb 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1500,7 +1500,7 @@ phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
 	 *
 	 * Accept the memory of the allocated buffer.
 	 */
-	accept_memory(found, found + size);
+	accept_memory(found, size);
 
 	return found;
 }
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 66e596c0129b..7a1a05cb048e 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1933,7 +1933,7 @@ static void __init deferred_free_pages(unsigned long pfn,
 	}
 
 	/* Accept chunks smaller than MAX_PAGE_ORDER upfront */
-	accept_memory(PFN_PHYS(pfn), PFN_PHYS(pfn + nr_pages));
+	accept_memory(PFN_PHYS(pfn), nr_pages * PAGE_SIZE);
 
 	for (i = 0; i < nr_pages; i++, page++, pfn++) {
 		if (pageblock_aligned(pfn))
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f4368c2fa395..e7e304d9e739 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -286,7 +286,6 @@ EXPORT_SYMBOL(nr_online_nodes);
 #endif
 
 static bool page_contains_unaccepted(struct page *page, unsigned int order);
-static void accept_page(struct page *page, unsigned int order);
 static bool cond_accept_memory(struct zone *zone, unsigned int order);
 static inline bool has_unaccepted_memory(void);
 static bool __free_unaccepted(struct page *page);
@@ -1268,7 +1267,7 @@ void __meminit __free_pages_core(struct page *page, unsigned int order,
 		if (order == MAX_PAGE_ORDER && __free_unaccepted(page))
 			return;
 
-		accept_page(page, order);
+		accept_memory(page_to_phys(page), PAGE_SIZE << order);
 	}
 
 	/*
@@ -6977,16 +6976,8 @@ early_param("accept_memory", accept_memory_parse);
 static bool page_contains_unaccepted(struct page *page, unsigned int order)
 {
 	phys_addr_t start = page_to_phys(page);
-	phys_addr_t end = start + (PAGE_SIZE << order);
 
-	return range_contains_unaccepted_memory(start, end);
-}
-
-static void accept_page(struct page *page, unsigned int order)
-{
-	phys_addr_t start = page_to_phys(page);
-
-	accept_memory(start, start + (PAGE_SIZE << order));
+	return range_contains_unaccepted_memory(start, PAGE_SIZE << order);
 }
 
 static bool try_to_accept_memory_one(struct zone *zone)
@@ -7011,7 +7002,7 @@ static bool try_to_accept_memory_one(struct zone *zone)
 	__ClearPageUnaccepted(page);
 	spin_unlock_irqrestore(&zone->lock, flags);
 
-	accept_page(page, MAX_PAGE_ORDER);
+	accept_memory(page_to_phys(page), PAGE_SIZE << MAX_PAGE_ORDER);
 
 	__free_pages_ok(page, MAX_PAGE_ORDER, FPI_TO_TAIL);
 
@@ -7083,10 +7074,6 @@ static bool page_contains_unaccepted(struct page *page, unsigned int order)
 	return false;
 }
 
-static void accept_page(struct page *page, unsigned int order)
-{
-}
-
 static bool cond_accept_memory(struct zone *zone, unsigned int order)
 {
 	return false;
diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h
index f6c6e5474c3a..1cf82acb2a3e 100644
--- a/tools/testing/memblock/internal.h
+++ b/tools/testing/memblock/internal.h
@@ -20,7 +20,7 @@ void memblock_free_pages(struct page *page, unsigned long pfn,
 {
 }
 
-static inline void accept_memory(phys_addr_t start, phys_addr_t end)
+static inline void accept_memory(phys_addr_t start, unsigned long size)
 {
 }
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 6/8] mm: Add a helper to accept page
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
                   ` (4 preceding siblings ...)
  2024-08-09 11:48 ` [PATCHv2 5/8] mm: Rework accept memory helpers Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 7/8] mm: page_isolation: Handle unaccepted memory isolation Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 8/8] mm: Accept to promo watermark Kirill A. Shutemov
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Accept a given struct page and add it free list.

The help is useful for physical memory scanners that want to use free
unaccepted memory.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Hildenbrand <david@redhat.com>
---
 mm/internal.h   |  8 ++++++++
 mm/page_alloc.c | 53 +++++++++++++++++++++++++++++++++++--------------
 2 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index 1159b04e76a3..ff47d57733ad 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1431,4 +1431,12 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
 	unsigned long new_addr, unsigned long len,
 	bool need_rmap_locks, bool for_stack);
 
+#ifdef CONFIG_UNACCEPTED_MEMORY
+void accept_page(struct page *page);
+#else /* CONFIG_UNACCEPTED_MEMORY */
+static inline void accept_page(struct page *page)
+{
+}
+#endif /* CONFIG_UNACCEPTED_MEMORY */
+
 #endif	/* __MM_INTERNAL_H */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e7e304d9e739..f0610c691ae5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6980,11 +6980,46 @@ static bool page_contains_unaccepted(struct page *page, unsigned int order)
 	return range_contains_unaccepted_memory(start, PAGE_SIZE << order);
 }
 
+static void __accept_page(struct zone *zone, unsigned long *flags,
+			  struct page *page)
+{
+	bool last;
+
+	list_del(&page->lru);
+	last = list_empty(&zone->unaccepted_pages);
+
+	account_freepages(zone, -MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
+	__mod_zone_page_state(zone, NR_UNACCEPTED, -MAX_ORDER_NR_PAGES);
+	__ClearPageUnaccepted(page);
+	spin_unlock_irqrestore(&zone->lock, *flags);
+
+	accept_memory(page_to_phys(page), PAGE_SIZE << MAX_PAGE_ORDER);
+
+	__free_pages_ok(page, MAX_PAGE_ORDER, FPI_TO_TAIL);
+
+	if (last)
+		static_branch_dec(&zones_with_unaccepted_pages);
+}
+
+void accept_page(struct page *page)
+{
+	struct zone *zone = page_zone(page);
+	unsigned long flags;
+
+	spin_lock_irqsave(&zone->lock, flags);
+	if (!PageUnaccepted(page)) {
+		spin_unlock_irqrestore(&zone->lock, flags);
+		return;
+	}
+
+	/* Unlocks zone->lock */
+	__accept_page(zone, &flags, page);
+}
+
 static bool try_to_accept_memory_one(struct zone *zone)
 {
 	unsigned long flags;
 	struct page *page;
-	bool last;
 
 	spin_lock_irqsave(&zone->lock, flags);
 	page = list_first_entry_or_null(&zone->unaccepted_pages,
@@ -6994,20 +7029,8 @@ static bool try_to_accept_memory_one(struct zone *zone)
 		return false;
 	}
 
-	list_del(&page->lru);
-	last = list_empty(&zone->unaccepted_pages);
-
-	account_freepages(zone, -MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
-	__mod_zone_page_state(zone, NR_UNACCEPTED, -MAX_ORDER_NR_PAGES);
-	__ClearPageUnaccepted(page);
-	spin_unlock_irqrestore(&zone->lock, flags);
-
-	accept_memory(page_to_phys(page), PAGE_SIZE << MAX_PAGE_ORDER);
-
-	__free_pages_ok(page, MAX_PAGE_ORDER, FPI_TO_TAIL);
-
-	if (last)
-		static_branch_dec(&zones_with_unaccepted_pages);
+	/* Unlocks zone->lock */
+	__accept_page(zone, &flags, page);
 
 	return true;
 }
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 7/8] mm: page_isolation: Handle unaccepted memory isolation
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
                   ` (5 preceding siblings ...)
  2024-08-09 11:48 ` [PATCHv2 6/8] mm: Add a helper to accept page Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  2024-08-09 11:48 ` [PATCHv2 8/8] mm: Accept to promo watermark Kirill A. Shutemov
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Page isolation machinery doesn't know anything about unaccepted memory
and considers it non-free. It leads to alloc_contig_pages() failure.

Treat unaccepted memory as free and accept memory on pageblock
isolation. Once memory is accepted it becomes PageBuddy() and page
isolation knows how to deal with them.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/page_isolation.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 042937d5abe4..39fb8c07aeb7 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -152,6 +152,9 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
 	unsigned long flags;
 	unsigned long check_unmovable_start, check_unmovable_end;
 
+	if (PageUnaccepted(page))
+		accept_page(page);
+
 	spin_lock_irqsave(&zone->lock, flags);
 
 	/*
@@ -367,6 +370,11 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags,
 		VM_BUG_ON(!page);
 		pfn = page_to_pfn(page);
 
+		if (PageUnaccepted(page)) {
+			pfn += MAX_ORDER_NR_PAGES;
+			continue;
+		}
+
 		if (PageBuddy(page)) {
 			int order = buddy_order(page);
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2 8/8] mm: Accept to promo watermark
  2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
                   ` (6 preceding siblings ...)
  2024-08-09 11:48 ` [PATCHv2 7/8] mm: page_isolation: Handle unaccepted memory isolation Kirill A. Shutemov
@ 2024-08-09 11:48 ` Kirill A. Shutemov
  7 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-09 11:48 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov (AMD), Mel Gorman, Vlastimil Babka
  Cc: Tom Lendacky, Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	Kirill A. Shutemov

Commit c574bbe91703 ("NUMA balancing: optimize page placement for memory
tiering system") introduced a new watermark above "high" -- "promo".

Accept memory memory to the highest watermark which is WMARK_PROMO now.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f0610c691ae5..84a7154fde93 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7046,8 +7046,8 @@ static bool cond_accept_memory(struct zone *zone, unsigned int order)
 	if (list_empty(&zone->unaccepted_pages))
 		return false;
 
-	/* How much to accept to get to high watermark? */
-	to_accept = high_wmark_pages(zone) -
+	/* How much to accept to get to promo watermark? */
+	to_accept = promo_wmark_pages(zone) -
 		    (zone_page_state(zone, NR_FREE_PAGES) -
 		    __zone_watermark_unusable_free(zone, order, 0) -
 		    zone_page_state(zone, NR_UNACCEPTED));
-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk().
  2024-08-09 11:48 ` [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk() Kirill A. Shutemov
@ 2024-08-09 15:31   ` Tom Lendacky
  2024-08-12  6:24     ` Kirill A. Shutemov
  0 siblings, 1 reply; 12+ messages in thread
From: Tom Lendacky @ 2024-08-09 15:31 UTC (permalink / raw)
  To: Kirill A. Shutemov, Andrew Morton, Borislav Petkov (AMD),
	Mel Gorman, Vlastimil Babka
  Cc: Mike Rapoport, Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel

On 8/9/24 06:48, Kirill A. Shutemov wrote:
> Currently, the kernel only accepts memory in get_page_from_freelist(),
> but there is another path that directly takes pages from free lists -
> __alloc_page_bulk(). This function can consume all accepted memory and
> will resort to __alloc_pages_noprof() if necessary.
> 
> Conditionally accepted in __alloc_pages_bulk().
> 
> The same issue may arise due to deferred page initialization. Kick the
> deferred initialization machinery before abandoning the zone, as the
> kernel does in get_page_from_freelist().

Is the deferred page init issue an existing problem? In other words,
should it be a separate patch with a Fixes: tag so it can go back to
stable kernels?

Thanks,
Tom

> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Acked-by: David Hildenbrand <david@redhat.com>
> ---
>  mm/page_alloc.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index f7bb885aab07..ed62ecd6775f 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4613,12 +4613,23 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid,
>  			goto failed;
>  		}
>  
> +		cond_accept_memory(zone, 0);
> +retry_this_zone:
>  		mark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK) + nr_pages;
>  		if (zone_watermark_fast(zone, 0,  mark,
>  				zonelist_zone_idx(ac.preferred_zoneref),
>  				alloc_flags, gfp)) {
>  			break;
>  		}
> +
> +		if (cond_accept_memory(zone, 0))
> +			goto retry_this_zone;
> +
> +		/* Try again if zone has deferred pages */
> +		if (deferred_pages_enabled()) {
> +			if (_deferred_grow_zone(zone, 0))
> +				goto retry_this_zone;
> +		}
>  	}
>  
>  	/*

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk().
  2024-08-09 15:31   ` Tom Lendacky
@ 2024-08-12  6:24     ` Kirill A. Shutemov
  0 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2024-08-12  6:24 UTC (permalink / raw)
  To: Tom Lendacky
  Cc: Andrew Morton, Borislav Petkov (AMD),
	Mel Gorman, Vlastimil Babka, Mike Rapoport,
	Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel

On Fri, Aug 09, 2024 at 10:31:03AM -0500, Tom Lendacky wrote:
> On 8/9/24 06:48, Kirill A. Shutemov wrote:
> > Currently, the kernel only accepts memory in get_page_from_freelist(),
> > but there is another path that directly takes pages from free lists -
> > __alloc_page_bulk(). This function can consume all accepted memory and
> > will resort to __alloc_pages_noprof() if necessary.
> > 
> > Conditionally accepted in __alloc_pages_bulk().
> > 
> > The same issue may arise due to deferred page initialization. Kick the
> > deferred initialization machinery before abandoning the zone, as the
> > kernel does in get_page_from_freelist().
> 
> Is the deferred page init issue an existing problem? In other words,
> should it be a separate patch with a Fixes: tag so it can go back to
> stable kernels?

Yes, it is existing problem, but the problem is transient (deferred thread
will add more pages) and there's fallback to __alloc_pages_noprof() which
knowns how to handle deferred pages. I don't think it is worth
backporting.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCHv2 1/8] mm: Fix endless reclaim on machines with unaccepted memory
  2024-08-09 11:48 ` [PATCHv2 1/8] mm: Fix endless reclaim on machines " Kirill A. Shutemov
@ 2024-08-12 22:12   ` Jianxiong Gao
  0 siblings, 0 replies; 12+ messages in thread
From: Jianxiong Gao @ 2024-08-12 22:12 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Andrew Morton, Borislav Petkov (AMD),
	Mel Gorman, Vlastimil Babka, Tom Lendacky, Mike Rapoport,
	Matthew Wilcox (Oracle),
	David Hildenbrand, Johannes Weiner, linux-mm, linux-kernel,
	stable

On Fri, Aug 9, 2024 at 4:49 AM Kirill A. Shutemov
<kirill.shutemov@linux.intel.com> wrote:
>
> Unaccepted memory is considered unusable free memory, which is not
> counted as free on the zone watermark check. This causes
> get_page_from_freelist() to accept more memory to hit the high
> watermark, but it creates problems in the reclaim path.
>
> The reclaim path encounters a failed zone watermark check and attempts
> to reclaim memory. This is usually successful, but if there is little or
> no reclaimable memory, it can result in endless reclaim with little to
> no progress. This can occur early in the boot process, just after start
> of the init process when the only reclaimable memory is the page cache
> of the init executable and its libraries.
>
> Make unaccepted memory free from watermark check point of view. This way
> unaccepted memory will never be the trigger of memory reclaim.
> Accept more memory in the get_page_from_freelist() if needed.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Reported-by: Jianxiong Gao <jxgao@google.com>
> Acked-by: David Hildenbrand <david@redhat.com>
> Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
> Cc: stable@vger.kernel.org # v6.5+

Tested-by: Jianxiong Gao <jxgao@google.com>
I have verified that the patch fixes the systemd issue reported.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-08-12 22:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-09 11:48 [PATCHv2 0/8] mm: Fix several issues with unaccepted memory Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 1/8] mm: Fix endless reclaim on machines " Kirill A. Shutemov
2024-08-12 22:12   ` Jianxiong Gao
2024-08-09 11:48 ` [PATCHv2 2/8] mm: Reduce deferred struct page init ifdeffery Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk() Kirill A. Shutemov
2024-08-09 15:31   ` Tom Lendacky
2024-08-12  6:24     ` Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 4/8] mm: Introduce PageUnaccepted() page type Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 5/8] mm: Rework accept memory helpers Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 6/8] mm: Add a helper to accept page Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 7/8] mm: page_isolation: Handle unaccepted memory isolation Kirill A. Shutemov
2024-08-09 11:48 ` [PATCHv2 8/8] mm: Accept to promo watermark Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®