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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 29B83C47089 for ; Thu, 27 May 2021 14:41:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D513160249 for ; Thu, 27 May 2021 14:41:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D513160249 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BBE746B006C; Thu, 27 May 2021 10:41:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B507A6B006E; Thu, 27 May 2021 10:41:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D6566B0070; Thu, 27 May 2021 10:41:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id 2633A6B006C for ; Thu, 27 May 2021 10:41:50 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A2110180F8B98 for ; Thu, 27 May 2021 14:41:49 +0000 (UTC) X-FDA: 78187275138.27.F3C083A Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by imf02.hostedemail.com (Postfix) with ESMTP id 0045C40002F3 for ; Thu, 27 May 2021 14:41:44 +0000 (UTC) Received: by mail-yb1-f181.google.com with SMTP id r7so965991ybs.10 for ; 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=RXUSv5HYiZNMbVk1zcsW/gyhX8mmrtASkpDoS6ttQbfy5jan9PvD3brMvIAq7a3Tsw ZIM6clyxPZ95K98znDgNZzfKmftFXo5uR+qViLhFrPlZBf9Ysto8fTBIaQ3OX66mvp22 avZKGKhBXwjZGHUgkv6+9QmPVeIAG4YRGBS7KlpQ7Q5NFqeRpcFQOTKVYjcbn90YHgTo +xyZ03TxrneuAW+XkHyEHEPey/+DbcmRgr3IwcDw+zsmb9ib3pwQAsd5gZ88vAvYLSMm 1tykJqDYO9BzhaUzxzZN5WTgIlCKNJA0QosvcbG60Moyq0Qwkn0zOwamp+yRNRceQDZM DMyg== X-Gm-Message-State: AOAM533obYzLwgySE0OXDNsyzdB9BLn92k9XNOU/CETXtTHaJte/UEbn k3Y+O46btcw0pRPo8PhASKqKqXaS8TBrLWEylmc= X-Google-Smtp-Source: ABdhPJxzJi1mIJCB7dkcmXbe4qDmLn1jrkqvUTD5Pi1mP9hJzrJ8ltrWO/v6eOsEXIj4lRFJpqjsZt/HSHtfTfFtyqE= 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" X-Rspamd-Queue-Id: 0045C40002F3 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="XSW/W9Wa"; spf=pass (imf02.hostedemail.com: domain of andriinakryiko@gmail.com designates 209.85.219.181 as permitted sender) smtp.mailfrom=andriinakryiko@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Stat-Signature: 9dub7qgkgfhadmsnd88tzugt13qtbizz X-HE-Tag: 1622126504-647130 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 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.