Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp898826pxj; Thu, 27 May 2021 14:25:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXn94uReflFXqkBicU0eWKbzWWtB6vbrzk13gwrqh4E1IDh2StCo7uY1XMCJ4cmPk12OAe X-Received: by 2002:a17:907:10d8:: with SMTP id rv24mr5877737ejb.542.1622150722868; Thu, 27 May 2021 14:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622150722; cv=none; d=google.com; s=arc-20160816; b=woreomtpgck0MeyFpoccmYRIrf3ANKC4T8x7w6k03K7VFYYn7GhIdDXpQ3AqJIbKj+ PQF1L9Y9ogEsrWCrTX83wD7wSW+uaqL3eJ0LKuKgZ5LXd7hKQut3y4WVIVxYB1iiNCEZ P1fvqadZ/s10gTd04Ie+xPKkOfWlmQAxEdhaTyZFQd1OKZk7RlWrSP2+MPGGVwQD/n14 PmZssbw14qgNVyfo3cdFbiiyTeE/xpt0REX571MEdmmwCfAsiF+yEkUowAGY8wMvO12y HfS7sttMHJtGcfAWaI6d3KhXytPtGbLXnI+j5TZPi09DZzgHNBzhFRY1x7IDtd+YA4qa 46Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=b/Mn6m+0szuABGuNz4gdUEHH56ZKs2OQ3Dg8rDpxUzE=; b=hCa9Z98IS4i04x60VpNh9JrsfleOaaRhe2mjtEaSKTLM9ehvtiWFFAioFgidu348zs fA5mv1pIui01HqNq46H/5exMJVjBry66OUH8SppFwTlpYvaK/jjnShAZLJJd/3kX8YRF nUQAQWZKAkQFJgt9fdAvZsF4hA2yp3KVficuLK2ZMUujgUOwSRtE2EkhQSn26WOMUUYU saFrnBdH4o9y+flgyeSMvYWKKr18AgJrNu/da0ZgVTMgOSdDbq2l2x3uZTsUxlqE2RbA /icO0ZUKPtxoXjy91PaiShI9IDPcK3e+fJgKcTgsBOOOSuRt1OvqzCjjhOnpAHjHU07H STpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XSW/W9Wa"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ka11si1315568ejc.367.2021.05.27.14.24.58; Thu, 27 May 2021 14:25:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XSW/W9Wa"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234570AbhE0OnZ (ORCPT + 99 others); Thu, 27 May 2021 10:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhE0OnY (ORCPT ); Thu, 27 May 2021 10:43:24 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE5AC061574; Thu, 27 May 2021 07:41:49 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id b13so1009902ybk.4; Thu, 27 May 2021 07:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b/Mn6m+0szuABGuNz4gdUEHH56ZKs2OQ3Dg8rDpxUzE=; b=XSW/W9WafmbrRZlc24lBgVOfwJ3pmFDiHzO44/xGvx7QKma/0OZXuepoaClYwEoYQL SUAr+kcAGGWYZ0fwQPpeTk358Rq/QVRXArqaLfrfbsG7rDfwAjtOCsQiwht90BVTbgGw CmhIq5/fs0DkSoIGxAmaLQy/EGSjgSXbQkpC0sAkBanhFAtwwDG6qkCmzIc26Udl5raY otShNCca77NEr/SI1VVhSU/+TKHLMlqrwbwd5zlesBlM34uqh5JpWhzZkNtCSRiYDsZE k2LBbSttOkkJuPJESN2+guVZTdIGm9cezRKbXnbvdn+CCZWZatV9dRDqeWa9mx2F0Ut+ cDRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b/Mn6m+0szuABGuNz4gdUEHH56ZKs2OQ3Dg8rDpxUzE=; b=ettNYMPOrKPJ7LCKGbnEyD9bePESWSbFx6fQ2E7+w6GQsxjQP3YUsdINTMzTMpj0i5 ay7DmE9bDYOxiko2uxjOQ75unhq4pkRfz9IJRqsAstfYH5rUwXx/umobDxBngqtNPx16 73TEDCxSGZeXYNv64aoI/KBBXvJnzZWWpjvSqHM0o8kBpD8CouK2OHDXOSUDgbY0Gh7K G9Ox4aguqzh1g0Z3tINDeJMOOF70z0XVChG4rxVGlGoRsdbLUZhHNSKzQb4ThILEFbM7 FeUibajWzFRbj2bRPtP3x+coAL6TOgBdFaSnU3ZNBvZqgXkDlx1LyUR60CFcNL+jsCMV V7ng== X-Gm-Message-State: AOAM533NusCSsrC9ZWoGLBNC1tFESVOfKuqmE3gftJtZASv5gHs9ueZj ngBpu5Nsg1ujE6koqa6kzFJx6MJYQkvKkxNyxGo= X-Received: by 2002:a25:1455:: with SMTP id 82mr5241773ybu.403.1622126508714; Thu, 27 May 2021 07:41:48 -0700 (PDT) MIME-Version: 1.0 References: <20210526080741.GW30378@techsingularity.net> <20210527090422.GA30378@techsingularity.net> In-Reply-To: From: Andrii Nakryiko Date: Thu, 27 May 2021 07:41:37 -0700 Message-ID: Subject: Re: [PATCH] mm/page_alloc: Work around a pahole limitation with zero-sized struct pagesets To: Christoph Hellwig Cc: Mel Gorman , Andrew Morton , Arnaldo Carvalho de Melo , Michal Suchanek , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , open list , Jiri Olsa , Hritik Vijay , bpf , Linux-Net , Linux-MM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 27, 2021 at 7:37 AM Andrii Nakryiko wrote: > > On Thu, May 27, 2021 at 2:19 AM Christoph Hellwig wrote: > > > > On Thu, May 27, 2021 at 10:04:22AM +0100, Mel Gorman wrote: > > > What do you suggest as an alternative? > > > > > > I added Arnaldo to the cc as he tagged the last released version of > > > pahole (1.21) and may be able to tag a 1.22 with Andrii's fix for pahole > > > included. > > > > > > The most obvious alternative fix for this issue is to require pahole > > > 1.22 to set CONFIG_DEBUG_INFO_BTF but obviously a version 1.22 that works > > > needs to exist first and right now it does not. I'd be ok with this but > > > users of DEBUG_INFO_BTF may object given that it'll be impossible to set > > > the option until there is a release. > > > > Yes, disable BTF. Empty structs are a very useful feature that we use > > in various places in the kernel. We can't just keep piling hacks over > > hacks to make that work with a recent fringe feature. Sorry, I accidentally send out empty response. CONFIG_DEBUG_INFO_BTF is a crucial piece of modern BPF ecosystem. It is enabled by default by most popular Linux distros. So it's hardly a fringe feature and is something that many people and applications depend on. I agree that empty structs are useful, but here we are talking about per-CPU variables only, which is the first use case so far, as far as I can see. If we had pahole 1.22 released and widely packaged it could have been a viable option to force it on everyone. But right now that's not the case. So while ugly, making sure pagesets is non-zero-sized is going to avoid a lot of pain for a lot of people. By the time we need another zero-sized per-CPU var, we might be able to force pahole to 1.22.