* [merged mm-stable] mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook.patch removed from -mm tree
@ 2025-01-14 6:41 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-01-14 6:41 UTC (permalink / raw)
To: mm-commits, ziy, william.kucharski, vbabka, songmuchun, mgorman,
linmiaohe, david, 42.hyeyoo, willy, akpm
The quilt patch titled
Subject: mm/page_alloc: move set_page_refcounted() to callers of post_alloc_hook()
has been removed from the -mm tree. Its filename was
mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: mm/page_alloc: move set_page_refcounted() to callers of post_alloc_hook()
Date: Mon, 25 Nov 2024 21:01:36 +0000
In preparation for allocating frozen pages, stop initialising the page
refcount in post_alloc_hook().
Link: https://lkml.kernel.org/r/20241125210149.2976098-5-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/compaction.c | 2 ++
mm/internal.h | 3 +--
mm/page_alloc.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
--- a/mm/compaction.c~mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook
+++ a/mm/compaction.c
@@ -83,6 +83,7 @@ static inline bool is_via_compact_memory
static struct page *mark_allocated_noprof(struct page *page, unsigned int order, gfp_t gfp_flags)
{
post_alloc_hook(page, order, __GFP_MOVABLE);
+ set_page_refcounted(page);
return page;
}
#define mark_allocated(...) alloc_hooks(mark_allocated_noprof(__VA_ARGS__))
@@ -1868,6 +1869,7 @@ again:
dst = (struct folio *)freepage;
post_alloc_hook(&dst->page, order, __GFP_MOVABLE);
+ set_page_refcounted(&dst->page);
if (order)
prep_compound_page(&dst->page, order);
cc->nr_freepages -= 1 << order;
--- a/mm/internal.h~mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook
+++ a/mm/internal.h
@@ -735,8 +735,7 @@ static inline void prep_compound_tail(st
extern void prep_compound_page(struct page *page, unsigned int order);
-extern void post_alloc_hook(struct page *page, unsigned int order,
- gfp_t gfp_flags);
+void post_alloc_hook(struct page *page, unsigned int order, gfp_t gfp_flags);
extern bool free_pages_prepare(struct page *page, unsigned int order);
extern int user_min_free_kbytes;
--- a/mm/page_alloc.c~mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook
+++ a/mm/page_alloc.c
@@ -1508,7 +1508,6 @@ inline void post_alloc_hook(struct page
int i;
set_page_private(page, 0);
- set_page_refcounted(page);
arch_alloc_page(page, order);
debug_pagealloc_map_pages(page, 1 << order);
@@ -1564,6 +1563,7 @@ static void prep_new_page(struct page *p
unsigned int alloc_flags)
{
post_alloc_hook(page, order, gfp_flags);
+ set_page_refcounted(page);
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
@@ -6360,6 +6360,7 @@ static void split_free_pages(struct list
int i;
post_alloc_hook(page, order, __GFP_MOVABLE);
+ set_page_refcounted(page);
if (!order)
continue;
_
Patches currently in -mm which might be from willy@infradead.org are
mm-remove-pagetranstail.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-14 6:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 6:41 [merged mm-stable] mm-page_alloc-move-set_page_refcounted-to-callers-of-post_alloc_hook.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.