From patchwork Mon Jul 5 09:51:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 12358631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 748B5C07E99 for ; Mon, 5 Jul 2021 09:51:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF7FC61374 for ; Mon, 5 Jul 2021 09:51:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF7FC61374 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 397866B0011; Mon, 5 Jul 2021 05:51:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36EA06B0036; Mon, 5 Jul 2021 05:51:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 236DD6B005D; Mon, 5 Jul 2021 05:51:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0127.hostedemail.com [216.40.44.127]) by kanga.kvack.org (Postfix) with ESMTP id 01B216B0011 for ; Mon, 5 Jul 2021 05:51:21 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7FD7F18294A4F for ; Mon, 5 Jul 2021 09:51:21 +0000 (UTC) X-FDA: 78328066362.09.D0D3528 Received: from outbound-smtp61.blacknight.com (outbound-smtp61.blacknight.com [46.22.136.249]) by imf12.hostedemail.com (Postfix) with ESMTP id EDEDA10000A5 for ; Mon, 5 Jul 2021 09:51:20 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp61.blacknight.com (Postfix) with ESMTPS id 35C48FAF67 for ; Mon, 5 Jul 2021 10:51:19 +0100 (IST) Received: (qmail 31473 invoked from network); 5 Jul 2021 09:51:19 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 5 Jul 2021 09:51:18 -0000 Date: Mon, 5 Jul 2021 10:51:17 +0100 From: Mel Gorman To: Andrew Morton Cc: bigeasy@linutronix.de, brouer@redhat.com, chuck.lever@oracle.com, linux-mm@kvack.org, mhocko@kernel.org, mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [PATCH] mm/page_alloc: Revert pahole zero-sized workaround Message-ID: <20210705095117.GM3840@techsingularity.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf12.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.249 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam02 X-Stat-Signature: u1j5ipetz9iwrckwz3f5fz6gznmithbc X-Rspamd-Queue-Id: EDEDA10000A5 X-HE-Tag: 1625478680-244909 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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),