From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 1509CC4707F for ; Thu, 27 May 2021 17:27:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80334613C0 for ; Thu, 27 May 2021 17:27:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80334613C0 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 0DD096B0070; Thu, 27 May 2021 13:27:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 066976B0071; Thu, 27 May 2021 13:27:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E36C26B0072; Thu, 27 May 2021 13:27:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id AD2E76B0070 for ; Thu, 27 May 2021 13:27:04 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 40A942C79 for ; Thu, 27 May 2021 17:27:04 +0000 (UTC) X-FDA: 78187691568.36.2DCC67D Received: from outbound-smtp16.blacknight.com (outbound-smtp16.blacknight.com [46.22.139.233]) by imf02.hostedemail.com (Postfix) with ESMTP id 6A56A40B8CF5 for ; Thu, 27 May 2021 17:26:59 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp16.blacknight.com (Postfix) with ESMTPS id 4CBCD1C477F for ; Thu, 27 May 2021 18:27:02 +0100 (IST) Received: (qmail 27096 invoked from network); 27 May 2021 17:27:01 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.23.168]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 27 May 2021 17:27:01 -0000 Date: Thu, 27 May 2021 18:27:00 +0100 From: Mel Gorman To: Andrii Nakryiko Cc: Andrew Morton , Christoph Hellwig , Arnaldo Carvalho de Melo , Michal Suchanek , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , LKML , Jiri Olsa , Hritik Vijay , Linux-BPF , Linux-Net , Linux-MM Subject: Re: [PATCH v2] mm/page_alloc: Work around a pahole limitation with zero-sized struct pagesets Message-ID: <20210527172700.GH30378@techsingularity.net> References: <20210527120251.GC30378@techsingularity.net> <20210527145441.GE30378@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6A56A40B8CF5 X-Stat-Signature: u6undfa7j7jqgteixwarrma7hrtdasde X-HE-Tag: 1622136419-649419 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: On Thu, May 27, 2021 at 09:36:35AM -0700, Andrii Nakryiko wrote: > On Thu, May 27, 2021 at 7:54 AM Mel Gorman wrote: > > > > On Thu, May 27, 2021 at 07:37:05AM -0700, Andrii Nakryiko wrote: > > > > This patch checks for older versions of pahole and only allows > > > > DEBUG_INFO_BTF_MODULES if pahole supports zero-sized per-cpu structures. > > > > DEBUG_INFO_BTF is still allowed as a KVM boot test passed with pahole > > > > > > Unfortunately this won't work. The problem is that vmlinux BTF is > > > corrupted, which results in module BTFs to be rejected as well, as > > > they depend on it. > > > > > > But vmlinux BTF corruption makes BPF subsystem completely unusable. So > > > even though kernel boots, nothing BPF-related works. So we'd need to > > > add dependency for DEBUG_INFO_BTF on pahole 1.22+. > > > > > > > While bpf usage would be broken, the kernel will boot and the effect > > should be transparent to any kernel build based on "make oldconfig". > > I think if DEBUG_INFO_BTF=y has no chance of generating valid vmlinux > BTF it has to be forced out. So if we are doing this at all, we should > do it for CONFIG_DEBUG_INFO_BTF, not CONFIG_DEBUG_INFO_BTF_MODULES. > CONFIG_DEBUG_INFO_BTF_MODULES will follow automatically. > Ok, I sent a version that prevents DEBUG_INFO_BTF being set unless pahole is at least 1.22. > > CONFIG_DEBUG_INFO_BTF defaults N so if that is forced out, it will be > > easily missed by a distribution kernel maintainer. > > We actually had previous discussions on forcing build failure in cases > when CONFIG_DEBUG_INFO_BTF=y can't be satisfied, but no one followed > up. It is weird how it is handled. DEBUG_INFO_BTF can be set and then fail to build vmlinux because pahole is too old. With DEBUG_INFO_BTF now requiring at least 1.22, the other version checks for 1.16 and 1.19 are redundant and could be cleaned up. > I'll look into this and will try to change the behavior. It's > caused too much confusion previously and now with changes like this we > are going to waste even more people's time. > Thanks. -- Mel Gorman SUSE Labs