@@ -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);
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(+)