* [PATCH] mm/page_alloc: Revert pahole zero-sized workaround
@ 2021-07-05 9:51 Mel Gorman
0 siblings, 0 replies; only message in thread
From: Mel Gorman @ 2021-07-05 9:51 UTC (permalink / raw)
To: Andrew Morton
Cc: bigeasy, brouer, chuck.lever, linux-mm, mhocko, mingo, peterz,
tglx, torvalds, vbabka
Commit dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to
local_lock") folded in a workaround patch for pahole that was unable to
deal with zero-sized percpu structures. A superior workaround is achieved
with commit a0b8200d06ad ("kbuild: skip per-CPU BTF generation for pahole
v1.18-v1.21"). This patch reverts the dummy field and the pahole version
check.
Fixes: dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock")
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
lib/Kconfig.debug | 3 ---
mm/page_alloc.c | 11 -----------
2 files changed, 14 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8acc01d7d816..5cf2585b78a1 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -313,9 +313,6 @@ config DEBUG_INFO_BTF
config PAHOLE_HAS_SPLIT_BTF
def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119")
-config PAHOLE_HAS_ZEROSIZE_PERCPU_SUPPORT
- def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "122")
-
config DEBUG_INFO_BTF_MODULES
def_bool y
depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d6e94cc8066c..3b97e17806be 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -124,17 +124,6 @@ static DEFINE_MUTEX(pcp_batch_high_lock);
struct pagesets {
local_lock_t lock;
-#if defined(CONFIG_DEBUG_INFO_BTF) && \
- !defined(CONFIG_DEBUG_LOCK_ALLOC) && \
- !defined(CONFIG_PAHOLE_HAS_ZEROSIZE_PERCPU_SUPPORT)
- /*
- * pahole 1.21 and earlier gets confused by zero-sized per-CPU
- * variables and produces invalid BTF. Ensure that
- * sizeof(struct pagesets) != 0 for older versions of pahole.
- */
- char __pahole_hack;
- #warning "pahole too old to support zero-sized struct pagesets"
-#endif
};
static DEFINE_PER_CPU(struct pagesets, pagesets) = {
.lock = INIT_LOCAL_LOCK(lock),
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-05 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 9:51 [PATCH] mm/page_alloc: Revert pahole zero-sized workaround Mel Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).