From: Gavin Shan <gshan@redhat.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, alexander.duyck@gmail.com,
akpm@linux-foundation.org, david@redhat.com,
anshuman.khandual@arm.com, catalin.marinas@arm.com,
will@kernel.org, shan.gavin@gmail.com
Subject: [PATCH 3/3] arm64: mm: Specify smaller page reporting order
Date: Mon, 21 Jun 2021 13:11:52 +0800 [thread overview]
Message-ID: <20210621051152.305224-4-gshan@redhat.com> (raw)
In-Reply-To: <20210621051152.305224-1-gshan@redhat.com>
The page reporting order is stick to @pageblock_order and its size
is 512MB when 64KB base page size is chosen. It also means the
page reporting won't be started if current freeing page can't come
up with a 512MB free area. It's hard when the system memory becomes
fragmented.
This specifies the page reporting order to 5 when the 64KB base page
size is chosen, corresponding to huge page size with 4KB base page
size, so that page reporting has more chance to work.
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Gavin Shan <gshan@redhat.com>
---
arch/arm64/include/asm/page.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/include/asm/page.h b/arch/arm64/include/asm/page.h
index 012cffc574e8..b8386e7d7d47 100644
--- a/arch/arm64/include/asm/page.h
+++ b/arch/arm64/include/asm/page.h
@@ -18,6 +18,19 @@
struct page;
struct vm_area_struct;
+/*
+ * The page reporting won't be started if the freeing page can't come up
+ * with a huge page, which is 512MB with 64KB base page size. It's hard
+ * to have 512MB free area when the memory becomes fragmented, stop page
+ * reporting from working properly. So we choose smaller page reporting
+ * order, which is same to the huge page size (2MB) with 4KB base page
+ * size. However, more overheads will be introduced because page reporting
+ * will be running more frequently.
+ */
+#if defined(CONFIG_PAGE_REPORTING) && defined(CONFIG_ARM64_64K_PAGES)
+#define PAGE_REPORTING_ORDER 5
+#endif
+
extern void copy_page(void *to, const void *from);
extern void clear_page(void *to);
--
2.23.0
next prev parent reply other threads:[~2021-06-21 3:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 5:11 [PATCH 0/3] mm/page_reporting: Make page reporting work on arm64 with 64KB page size Gavin Shan
2021-06-21 5:11 ` [PATCH 1/3] mm/page_reporting: Allow to set reporting order Gavin Shan
2021-06-21 5:11 ` [PATCH 2/3] mm/page_reporting: Allow architecture to select " Gavin Shan
2021-06-21 5:11 ` Gavin Shan [this message]
2021-06-21 14:02 ` [PATCH 0/3] mm/page_reporting: Make page reporting work on arm64 with 64KB page size Alexander Duyck
2021-06-21 16:06 ` Michael Kelley
2021-06-22 2:04 ` ** POTENTIAL FRAUD ALERT - RED HAT ** " Gavin Shan
2021-06-22 2:01 ` Gavin Shan
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=20210621051152.305224-4-gshan@redhat.com \
--to=gshan@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.duyck@gmail.com \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shan.gavin@gmail.com \
--cc=will@kernel.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