From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-mm@kvack.org
Subject: [PATCH 6/6] mm: Use page->private instead of page->index in percpu
Date: Tue, 23 Jul 2024 16:35:01 +0100 [thread overview]
Message-ID: <20240723153503.1669586-7-willy@infradead.org> (raw)
In-Reply-To: <20240723153503.1669586-1-willy@infradead.org>
The percpu allocator only uses one field in struct page, just change
it from page->index to page->private.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
mm/percpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index 20d91af8c033..763fe7641602 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -253,13 +253,13 @@ static int pcpu_chunk_slot(const struct pcpu_chunk *chunk)
/* set the pointer to a chunk in a page struct */
static void pcpu_set_page_chunk(struct page *page, struct pcpu_chunk *pcpu)
{
- page->index = (unsigned long)pcpu;
+ page->private = (unsigned long)pcpu;
}
/* obtain pointer to a chunk from a page struct */
static struct pcpu_chunk *pcpu_get_page_chunk(struct page *page)
{
- return (struct pcpu_chunk *)page->index;
+ return (struct pcpu_chunk *)page->private;
}
static int __maybe_unused pcpu_page_idx(unsigned int cpu, int page_idx)
--
2.43.0
prev parent reply other threads:[~2024-07-23 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 15:34 [PATCH 0/6] page->index removals in mm Matthew Wilcox (Oracle)
2024-07-23 15:34 ` [PATCH 1/6] bootmem: Stop using page->index Matthew Wilcox (Oracle)
2024-07-23 15:34 ` [PATCH 2/6] mm: Constify page_address_in_vma() Matthew Wilcox (Oracle)
2024-07-24 5:54 ` kernel test robot
2024-07-24 7:24 ` kernel test robot
2024-07-23 15:34 ` [PATCH 3/6] mm: Convert page_to_pgoff() to page_pgoff() Matthew Wilcox (Oracle)
2024-07-24 7:24 ` kernel test robot
2024-07-23 15:34 ` [PATCH 4/6] mm: Mass constification of folio/page pointers Matthew Wilcox (Oracle)
2024-07-23 15:35 ` [PATCH 5/6] mm: Remove references to page->index in huge_memory.c Matthew Wilcox (Oracle)
2024-07-23 15:35 ` Matthew Wilcox (Oracle) [this message]
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=20240723153503.1669586-7-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
/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