The quilt patch titled Subject: mm-page_alloc-remove-prefetchw-on-freeing-page-to-buddy-system-v2 has been removed from the -mm tree. Its filename was mm-page_alloc-remove-prefetchw-on-freeing-page-to-buddy-system-v2.patch This patch was dropped because it was nacked ------------------------------------------------------ From: Wei Yang <richard.weiyang@xxxxxxxxx> Subject: mm-page_alloc-remove-prefetchw-on-freeing-page-to-buddy-system-v2 Date: Thu, 4 Jul 2024 01:59:06 +0000 slightly adjust the loop based on David's comment Link: https://lkml.kernel.org/r/20240704015906.18437-1-richard.weiyang@xxxxxxxxx Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> Suggested-by: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-remove-prefetchw-on-freeing-page-to-buddy-system-v2 +++ a/mm/page_alloc.c @@ -1224,7 +1224,7 @@ void __free_pages_core(struct page *page { unsigned int nr_pages = 1 << order; struct page *p = page; - unsigned int loop; + unsigned int loop = 0; /* * When initializing the memmap, __init_single_page() sets the refcount @@ -1236,10 +1236,13 @@ void __free_pages_core(struct page *page */ if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG) && unlikely(context == MEMINIT_HOTPLUG)) { - for (loop = 0; loop < nr_pages; loop++, p++) { + for (;;) { VM_WARN_ON_ONCE(PageReserved(p)); __ClearPageOffline(p); set_page_count(p, 0); + if (++loop >= nr_pages) + break; + p++; } /* @@ -1250,9 +1253,12 @@ void __free_pages_core(struct page *page debug_pagealloc_map_pages(page, nr_pages); adjust_managed_page_count(page, nr_pages); } else { - for (loop = 0; loop < nr_pages; loop++, p++) { + for (;;) { __ClearPageReserved(p); set_page_count(p, 0); + if (++loop >= nr_pages) + break; + p++; } /* memblock adjusts totalram_pages() manually. */ _ Patches currently in -mm which might be from richard.weiyang@xxxxxxxxx are kernel-forkc-get-totalram_pages-from-memblock-to-calculate-max_threads.patch kernel-forkc-put-set_max_threads-task_struct_whitelist-in-__init-section.patch mm-page_alloc-remove-prefetchw-on-freeing-page-to-buddy-system.patch