diff for duplicates of <20180723152323.GA3699@cmpxchg.org> diff --git a/a/1.txt b/N1/1.txt index bff028f..f08e169 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -34,7 +34,7 @@ On Mon, Jul 23, 2018 at 03:36:09PM +0200, Arnd Bergmann wrote: This BUILD_BUG_ON() is to make sure we're sizing the VMEMMAP struct page array properly (address space divided by struct page size). -From the code: +>From the code: /* * Log2 of the upper bound of the size of a struct page. Used for sizing @@ -96,7 +96,7 @@ need to make it conditional to those. --- -From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001 +>From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001 From: Johannes Weiner <hannes@cmpxchg.org> Date: Mon, 23 Jul 2018 10:18:23 -0400 Subject: [PATCH] arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap diff --git a/a/content_digest b/N1/content_digest index 42e6e59..b07e2cf 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,27 +1,10 @@ "ref\020180712172942.10094-1-hannes@cmpxchg.org\0" "ref\020180712172942.10094-3-hannes@cmpxchg.org\0" "ref\0CAK8P3a3Nsmt54-ed_gWNev3CBS6_Sv5QGOw4G0sY4ZXOi1R4_Q@mail.gmail.com\0" - "From\0Johannes Weiner <hannes@cmpxchg.org>\0" - "Subject\0Re: [PATCH 02/10] mm: workingset: tell cache transitions from workingset thrashing\0" + "From\0hannes@cmpxchg.org (Johannes Weiner)\0" + "Subject\0[PATCH 02/10] mm: workingset: tell cache transitions from workingset thrashing\0" "Date\0Mon, 23 Jul 2018 11:23:23 -0400\0" - "To\0Arnd Bergmann <arnd@arndb.de>\0" - "Cc\0Ingo Molnar <mingo@redhat.com>" - Peter Zijlstra <peterz@infradead.org> - Andrew Morton <akpm@linux-foundation.org> - Linus Torvalds <torvalds@linux-foundation.org> - Tejun Heo <tj@kernel.org> - Suren Baghdasaryan <surenb@google.com> - Vinayak Menon <vinmenon@codeaurora.org> - Christopher Lameter <cl@linux.com> - Mike Galbraith <efault@gmx.de> - Shakeel Butt <shakeelb@google.com> - Linux-MM <linux-mm@kvack.org> - cgroups@vger.kernel.org - Linux Kernel Mailing List <linux-kernel@vger.kernel.org> - kernel-team@fb.com - Catalin Marinas <catalin.marinas@arm.com> - Will Deacon <will.deacon@arm.com> - " Linux ARM <linux-arm-kernel@lists.infradead.org>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Hi Arnd,\n" @@ -60,7 +43,7 @@ "This BUILD_BUG_ON() is to make sure we're sizing the VMEMMAP struct\n" "page array properly (address space divided by struct page size).\n" "\n" - "From the code:\n" + ">From the code:\n" "\n" "/*\n" " * Log2 of the upper bound of the size of a struct page. Used for sizing\n" @@ -122,7 +105,7 @@ "\n" "---\n" "\n" - "From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001\n" + ">From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001\n" "From: Johannes Weiner <hannes@cmpxchg.org>\n" "Date: Mon, 23 Jul 2018 10:18:23 -0400\n" "Subject: [PATCH] arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap\n" @@ -190,4 +173,4 @@ "-- \n" 2.18.0 -c703101bbff59018c73dd2c80d764b05fc3e87867c64e5f5df74255a12fbc7fb +4bb1021375e78b2b0e38cf916821890d5d519295aa36109020aa95ca6689c208
diff --git a/a/1.txt b/N2/1.txt index bff028f..c9199a6 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -34,7 +34,7 @@ On Mon, Jul 23, 2018 at 03:36:09PM +0200, Arnd Bergmann wrote: This BUILD_BUG_ON() is to make sure we're sizing the VMEMMAP struct page array properly (address space divided by struct page size). -From the code: +>From the code: /* * Log2 of the upper bound of the size of a struct page. Used for sizing @@ -95,71 +95,3 @@ So for configs for which the check is intended, it passes. We just need to make it conditional to those. --- - -From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001 -From: Johannes Weiner <hannes@cmpxchg.org> -Date: Mon, 23 Jul 2018 10:18:23 -0400 -Subject: [PATCH] arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap - setups - -Arnd reports the following arm64 randconfig build error with the PSI -patches that add another page flag: - - /git/arm-soc/arch/arm64/mm/init.c: In function 'mem_init': - /git/arm-soc/include/linux/compiler.h:357:38: error: call to - '__compiletime_assert_618' declared with attribute error: BUILD_BUG_ON - failed: sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT) - -The additional page flag causes other information stored in -page->flags to get bumped into their own struct page member: - - #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <= - BITS_PER_LONG - NR_PAGEFLAGS - #define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT - #else - #define LAST_CPUPID_WIDTH 0 - #endif - - #if defined(CONFIG_NUMA_BALANCING) && LAST_CPUPID_WIDTH == 0 - #define LAST_CPUPID_NOT_IN_PAGE_FLAGS - #endif - -which in turn causes the struct page size to exceed the size set in -STRUCT_PAGE_MAX_SHIFT. This value is an an estimate used to size the -VMEMMAP page array according to address space and struct page size. - -However, the check is performed - and triggers here - on a !VMEMMAP -config, which consumes an additional 22 page bits for the sparse -section id. When VMEMMAP is enabled, those bits are returned, cpupid -doesn't need its own member, and the page passes the VMEMMAP check. - -Restrict that check to the situation it was meant to check: that we -are sizing the VMEMMAP page array correctly. - -Reported-by: Arnd Bergmann <arnd@arndb.de> -Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> ---- - arch/arm64/mm/init.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c -index 1b18b4722420..72c9b6778b0a 100644 ---- a/arch/arm64/mm/init.c -+++ b/arch/arm64/mm/init.c -@@ -611,11 +611,13 @@ void __init mem_init(void) - BUILD_BUG_ON(TASK_SIZE_32 > TASK_SIZE_64); - #endif - -+#ifndef CONFIG_SPARSEMEM_VMEMMAP - /* - * Make sure we chose the upper bound of sizeof(struct page) -- * correctly. -+ * correctly when sizing the VMEMMAP array. - */ - BUILD_BUG_ON(sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT)); -+#endif - - if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) { - extern int sysctl_overcommit_memory; --- -2.18.0 diff --git a/a/content_digest b/N2/content_digest index 42e6e59..31d68a4 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -60,7 +60,7 @@ "This BUILD_BUG_ON() is to make sure we're sizing the VMEMMAP struct\n" "page array properly (address space divided by struct page size).\n" "\n" - "From the code:\n" + ">From the code:\n" "\n" "/*\n" " * Log2 of the upper bound of the size of a struct page. Used for sizing\n" @@ -120,74 +120,6 @@ "So for configs for which the check is intended, it passes. We just\n" "need to make it conditional to those.\n" "\n" - "---\n" - "\n" - "From 1d24635a6c7cd395bad5c29a3b9e5d2e98d9ab84 Mon Sep 17 00:00:00 2001\n" - "From: Johannes Weiner <hannes@cmpxchg.org>\n" - "Date: Mon, 23 Jul 2018 10:18:23 -0400\n" - "Subject: [PATCH] arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap\n" - " setups\n" - "\n" - "Arnd reports the following arm64 randconfig build error with the PSI\n" - "patches that add another page flag:\n" - "\n" - " /git/arm-soc/arch/arm64/mm/init.c: In function 'mem_init':\n" - " /git/arm-soc/include/linux/compiler.h:357:38: error: call to\n" - " '__compiletime_assert_618' declared with attribute error: BUILD_BUG_ON\n" - " failed: sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT)\n" - "\n" - "The additional page flag causes other information stored in\n" - "page->flags to get bumped into their own struct page member:\n" - "\n" - " #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <=\n" - " BITS_PER_LONG - NR_PAGEFLAGS\n" - " #define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT\n" - " #else\n" - " #define LAST_CPUPID_WIDTH 0\n" - " #endif\n" - "\n" - " #if defined(CONFIG_NUMA_BALANCING) && LAST_CPUPID_WIDTH == 0\n" - " #define LAST_CPUPID_NOT_IN_PAGE_FLAGS\n" - " #endif\n" - "\n" - "which in turn causes the struct page size to exceed the size set in\n" - "STRUCT_PAGE_MAX_SHIFT. This value is an an estimate used to size the\n" - "VMEMMAP page array according to address space and struct page size.\n" - "\n" - "However, the check is performed - and triggers here - on a !VMEMMAP\n" - "config, which consumes an additional 22 page bits for the sparse\n" - "section id. When VMEMMAP is enabled, those bits are returned, cpupid\n" - "doesn't need its own member, and the page passes the VMEMMAP check.\n" - "\n" - "Restrict that check to the situation it was meant to check: that we\n" - "are sizing the VMEMMAP page array correctly.\n" - "\n" - "Reported-by: Arnd Bergmann <arnd@arndb.de>\n" - "Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>\n" - "---\n" - " arch/arm64/mm/init.c | 4 +++-\n" - " 1 file changed, 3 insertions(+), 1 deletion(-)\n" - "\n" - "diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c\n" - "index 1b18b4722420..72c9b6778b0a 100644\n" - "--- a/arch/arm64/mm/init.c\n" - "+++ b/arch/arm64/mm/init.c\n" - "@@ -611,11 +611,13 @@ void __init mem_init(void)\n" - " \tBUILD_BUG_ON(TASK_SIZE_32\t\t\t> TASK_SIZE_64);\n" - " #endif\n" - " \n" - "+#ifndef CONFIG_SPARSEMEM_VMEMMAP\n" - " \t/*\n" - " \t * Make sure we chose the upper bound of sizeof(struct page)\n" - "-\t * correctly.\n" - "+\t * correctly when sizing the VMEMMAP array.\n" - " \t */\n" - " \tBUILD_BUG_ON(sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT));\n" - "+#endif\n" - " \n" - " \tif (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {\n" - " \t\textern int sysctl_overcommit_memory;\n" - "-- \n" - 2.18.0 + --- -c703101bbff59018c73dd2c80d764b05fc3e87867c64e5f5df74255a12fbc7fb +96c74e5f948bab0af7d92c0e94d1c12b542eda9515765acab45fc87d1428cd67
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.