From: Oscar Salvador <osalvador@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
David Hildenbrand <david@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Oscar Salvador <osalvador@suse.de>
Subject: [PATCH] arch/x86: Do not explicitly clear Reserved flag in free_pagetable
Date: Mon, 27 May 2024 06:45:23 +0200 [thread overview]
Message-ID: <20240527044523.29207-1-osalvador@suse.de> (raw)
In free_pagetable() we use the non-atomic version for clearing the
PageReserved bit from the page.
free_pagetable() will either call free_reserved_page() or
put_page_bootmem(), which will eventually end up calling
free_serverd_page(), and in there we already clear the PageReserved flag.
Signed-off-by: Oscar Salvador <osalvador@suse.de>
---
This has been like this since commit ae9aae9eda2d ("memory-hotplug: common APIs to
support page tables hot-remove"), so I might be missing something obvious, but
I cannot explain why we would need that __ClearPageReserved upfront, when
free_reserved_pages() already does that for us.
---
arch/x86/mm/init_64.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 7e177856ee4f..9f4778c2cf9f 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -980,8 +980,6 @@ static void __meminit free_pagetable(struct page *page, int order)
/* bootmem page has reserved flag */
if (PageReserved(page)) {
- __ClearPageReserved(page);
-
magic = page->index;
if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) {
while (nr_pages--)
--
2.45.1
next reply other threads:[~2024-05-27 4:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 4:45 Oscar Salvador [this message]
2024-05-27 7:46 ` [PATCH] arch/x86: Do not explicitly clear Reserved flag in free_pagetable David Hildenbrand
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=20240527044523.29207-1-osalvador@suse.de \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.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 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.