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.8 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 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 4620AC47090 for ; Sun, 30 May 2021 00:47:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F25E60FDA for ; Sun, 30 May 2021 00:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbhE3Aso (ORCPT ); Sat, 29 May 2021 20:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhE3Asn (ORCPT ); Sat, 29 May 2021 20:48:43 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11418C061574; Sat, 29 May 2021 17:47:06 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id f84so11184162ybg.0; Sat, 29 May 2021 17:47:06 -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=wHVx+VBhplvwzx2toCSsFH2zHsatsW41FO7wcaTFWzA=; b=gJN7A3ulotTcEQc2Wa/lHhxAVfgLkvK3/aFtXAZrmwQauqXYPLfU49tN9cKmqp3Cgt y/MIgJ9krRME6CKdOFngV5d9Mk6yQK1DO59Bu8sMbAmQTiylPNbeIredhPLhb/zYceYR 6SGIW5ciEZK5Zwriyetu0FvabLdtod8DO55qHoG1Rrbk9n4aqszLigI1tXnNZ7ONOIrL py97cqhYGjAKzpM1jxANBb1CxlhV8MpaR107zMeWICa7f4t6bh35fi5QfWlHiO1lLUq6 vyYPMkbOW4JIkqwRc0TAQCAdIlbKvKEfz3eISBrM4Lmbnm2uVJkvt0u60sU9ejPapkH2 mpNA== 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=wHVx+VBhplvwzx2toCSsFH2zHsatsW41FO7wcaTFWzA=; b=tSIBDNzADAqNtcqvdF6Q23gAA+5sjm1PIDp1YQVlXm6gJbHvhtuSe2HzxC6RSIJSZM GUkJC8oMFUZBd0+5oT6Td4luQQkK8S94GP5e/ddLlfJ57U0bcy57NX4ZXrSMI93o5kAV 1z3sc3LFgIqb9VnS0v5U8rLR1cOvlJZoDyoUXhulIMxdl+rhNu+lK7Wsfbzs+qOMUUGT XgR66fGjQfO+knHCxR2Cp/iXfNJTJ4S5YEzwqBy9anNcj/uw3k6Fz/ZzSKYtFjwODQdJ /DNDr4mWDNk6A6n0lTwM99UUEq4LWXs8JWe7a/FWbFe+2FkJSk0pSn9c4XB1JOntVV7o uXgg== X-Gm-Message-State: AOAM5321eFdan4m4mTocTYfrQCaN39KLKKZ+IVqIsfxDy70AXbFf4Ax9 w9BpgXXKjbHhdnWuCJaxWroNzOI2RVWkx6n1uCtHeRqK X-Google-Smtp-Source: ABdhPJyVCSvo7YuE7iTDPdR6ItpzciTvgUe4BzC9/eZuXPloN32lpJW0F6uHoswRlFR4/UW802WB0tRxgMNNbLbqd5g= X-Received: by 2002:a25:ba06:: with SMTP id t6mr20800026ybg.459.1622335625288; Sat, 29 May 2021 17:47:05 -0700 (PDT) MIME-Version: 1.0 References: <20210526080741.GW30378@techsingularity.net> <20210527090422.GA30378@techsingularity.net> <8fe547e9e87f40aebce82021d76a2d08@AcuMS.aculab.com> In-Reply-To: <8fe547e9e87f40aebce82021d76a2d08@AcuMS.aculab.com> From: Andrii Nakryiko Date: Sat, 29 May 2021 17:46:54 -0700 Message-ID: Subject: Re: [PATCH] mm/page_alloc: Work around a pahole limitation with zero-sized struct pagesets To: David Laight Cc: Christoph Hellwig , 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 Fri, May 28, 2021 at 1:09 AM David Laight wrote: > > From: Andrii Nakryiko > > Sent: 27 May 2021 15:42 > ... > > 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. > ... > > Would it be feasible to put the sources for pahole into the > kernel repository and build it at the same time as objtool? > > That would remove any issues about the latest version > not being available. That would be great for the kernel build, but pahole is more than just a DWARF-to-BTF converter and it has a substantial amount of logic for loading and processing DWARF before it gets converted to BTF. All BTF-related pieces are provided by libbpf, which is already part of kernel sources, so that's not a problem. DWARF processing is a problem and would add a new dependency on libdw-devel, at least. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) 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.8 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 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 C457FC47082 for ; Sun, 30 May 2021 00:47:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4854C61019 for ; Sun, 30 May 2021 00:47:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4854C61019 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 14F756B006C; Sat, 29 May 2021 20:47:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0EF1C6B006E; Sat, 29 May 2021 20:47:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA9E16B0070; Sat, 29 May 2021 20:47:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id AEE9A6B006C for ; Sat, 29 May 2021 20:47:06 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4682A8249980 for ; Sun, 30 May 2021 00:47:06 +0000 (UTC) X-FDA: 78196058052.18.6AAD300 Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) by imf29.hostedemail.com (Postfix) with ESMTP id 15CA1368 for ; Sun, 30 May 2021 00:46:52 +0000 (UTC) Received: by mail-yb1-f171.google.com with SMTP id r8so11087160ybb.9 for ; Sat, 29 May 2021 17:47:05 -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=wHVx+VBhplvwzx2toCSsFH2zHsatsW41FO7wcaTFWzA=; b=gJN7A3ulotTcEQc2Wa/lHhxAVfgLkvK3/aFtXAZrmwQauqXYPLfU49tN9cKmqp3Cgt y/MIgJ9krRME6CKdOFngV5d9Mk6yQK1DO59Bu8sMbAmQTiylPNbeIredhPLhb/zYceYR 6SGIW5ciEZK5Zwriyetu0FvabLdtod8DO55qHoG1Rrbk9n4aqszLigI1tXnNZ7ONOIrL py97cqhYGjAKzpM1jxANBb1CxlhV8MpaR107zMeWICa7f4t6bh35fi5QfWlHiO1lLUq6 vyYPMkbOW4JIkqwRc0TAQCAdIlbKvKEfz3eISBrM4Lmbnm2uVJkvt0u60sU9ejPapkH2 mpNA== 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=wHVx+VBhplvwzx2toCSsFH2zHsatsW41FO7wcaTFWzA=; b=CtSVYx84q8RlVIdy/dMxwul61z2EOyZPejZT8+maYtYumf5KkaSgPNj1q+lXkFHFa2 dptESBK8LUFMbAF7W/hiWeDe14Bu5dgEz40PoB80EpmiP67LU/crWfl9anB41qr9AOGd BdRYd/eSrQ1KFfBwxruEYZEshMUJe7nRMjtO5Ianx+5ZbpHKYlvc67hRqNsmx2qX4yG4 VZrHATNnJT9k2/Xz03He2DUcS9oDFQbSulYhvX6wKCdKsEfB30jtJvkq4cExaF2D+xWT yEK63fGK9mOiuJyrzM8nr2A/AzhsB5yrUoLe5aPmOZPBMf1VbsnkmlYBTJwP3aUbF0dc A8bw== X-Gm-Message-State: AOAM532Bmn95b8G5Cvx2au36G1+xlT7k+PtFhmlfy4ulXzuu1QPOym6F YJGBT2wIDWTJIEWRNEn8bggiRVgnQVx3llAX+ug= X-Google-Smtp-Source: ABdhPJyVCSvo7YuE7iTDPdR6ItpzciTvgUe4BzC9/eZuXPloN32lpJW0F6uHoswRlFR4/UW802WB0tRxgMNNbLbqd5g= X-Received: by 2002:a25:ba06:: with SMTP id t6mr20800026ybg.459.1622335625288; Sat, 29 May 2021 17:47:05 -0700 (PDT) MIME-Version: 1.0 References: <20210526080741.GW30378@techsingularity.net> <20210527090422.GA30378@techsingularity.net> <8fe547e9e87f40aebce82021d76a2d08@AcuMS.aculab.com> In-Reply-To: <8fe547e9e87f40aebce82021d76a2d08@AcuMS.aculab.com> From: Andrii Nakryiko Date: Sat, 29 May 2021 17:46:54 -0700 Message-ID: Subject: Re: [PATCH] mm/page_alloc: Work around a pahole limitation with zero-sized struct pagesets To: David Laight Cc: Christoph Hellwig , 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" Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=gJN7A3ul; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of andriinakryiko@gmail.com designates 209.85.219.171 as permitted sender) smtp.mailfrom=andriinakryiko@gmail.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 15CA1368 X-Stat-Signature: tumrwddg6m8qf16zrgnjkq88bw1ux4rs X-HE-Tag: 1622335612-798966 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 28, 2021 at 1:09 AM David Laight wrote: > > From: Andrii Nakryiko > > Sent: 27 May 2021 15:42 > ... > > 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. > ... > > Would it be feasible to put the sources for pahole into the > kernel repository and build it at the same time as objtool? > > That would remove any issues about the latest version > not being available. That would be great for the kernel build, but pahole is more than just a DWARF-to-BTF converter and it has a substantial amount of logic for loading and processing DWARF before it gets converted to BTF. All BTF-related pieces are provided by libbpf, which is already part of kernel sources, so that's not a problem. DWARF processing is a problem and would add a new dependency on libdw-devel, at least. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales)