Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp978578pxj; Thu, 27 May 2021 16:50:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj0mpeVbwXD73TT+AiinjdpIbASh7cpmJu6MLfV1AWatEySbcTgyddQXzNfwH8HMg21UHd X-Received: by 2002:a05:6e02:5a5:: with SMTP id k5mr4982639ils.108.1622159431742; Thu, 27 May 2021 16:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622159431; cv=none; d=google.com; s=arc-20160816; b=XICk7c7LCCtRbidcLm9PNq2eUxhSsTArLQz1r2+eGkULtHGpd3Q18cfjKT5b89xvOv n2VjZVYQ7q+jGLD90uXNyuFSINgrDBgYOCG/YsjK4lv9Tp9XpWEc1juHkPASV1FIUWeH yUDEI+ftXr/+eRQ8uR1zbgGjalh8oCHQvJ5ytUPj6PAOlh1I+7yYvdK4/31XwtKkgM8y /x7wWLtky0Fz8U2sTgaOjh/GwjKkcEZtFxOyzoH9mJ8ia4dgiPr2F2mR9hKpIRdBmSC+ 1LWutZeo9iqD5QLAmsfD7kDo0Qog8AEz+nXFIbREHhF7NWpMOEQNPyYhIG2VMIaNWrTF pQMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=eFGjB/KykS9J7kJ7MpVPqvh8zhxqzYovNPnXIWzez2I=; b=GOBFHH+jR7dupcHsjKKuzfkNWH+ymDpDEY/2TtBAuXXNShQEfd5QLh93F1mMeYt0HO RJKJBnUL1LJ+aq+c+Is/i50zI18BfjT7OUVHu8Hxfb0c42748aT+13soQUlnu2FqYklV VUDB0+rSy64oaKPZP744TUl0W0qu3MNf169ISl+l6XblC5HHit9EymDbJX69nYUHCKHu 619tdL2JUs/9/Xt9kQaITPqpTp3DSUZet7zpoft3JZwzt81xd7ATCun0vJh14kHxM+T2 Cqy4V7Nha9HhzvFRxTqmogGEaxb09NtrGgtm8FkElH4h2KzseTYlkaKwdobjrM6c4aLs 84VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si4421294iow.30.2021.05.27.16.50.16; Thu, 27 May 2021 16:50:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236940AbhE0R2h (ORCPT + 99 others); Thu, 27 May 2021 13:28:37 -0400 Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:49772 "EHLO outbound-smtp02.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234994AbhE0R2g (ORCPT ); Thu, 27 May 2021 13:28:36 -0400 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp02.blacknight.com (Postfix) with ESMTPS id 383EF2600B 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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