Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1298446rwr; Wed, 3 May 2023 13:03:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ekfqwq/hOzYoYekqinCbK3Dan8RiClrTPz7RGidwTI2QRyglJA0nClSAQe/cHSDNGs1sp X-Received: by 2002:a17:903:44c:b0:1ab:15c2:e2e9 with SMTP id iw12-20020a170903044c00b001ab15c2e2e9mr1143418plb.7.1683144210596; Wed, 03 May 2023 13:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683144210; cv=none; d=google.com; s=arc-20160816; b=Mr6qF/iYLY50eyL+l7ACU/QHMuVu2EoTSPd/4Y9a2iqpmNSsBnX9Feq3OHxR0KV1rG 7gvJbLql8MVTWiJ3Ue3Y6UXFN5x+aAnf8Bb/FaTkyPBxxvD0ty/zZoX2cE+E1ISBVSHB GBJW86EekY/W+RI7Sw1F254j6WXQpQU04jc7ONb7GrnBFnD8YVIxgpv717ZZBkOBVmwx cLX7+EnHEMiVKtBcw6LxTMHh75s5+x19Vu6zts0/VsWSqEf80wHni1Y1Y73sHAeW/KMq t2fc3C+eV4C+15GfH1+WV2t1imrpPFPy/saoBLLlukhy4tc5zw/fA8i1PwYCyI8W7TR1 Iafg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7eRiiP2JCtlxvX+BHzTjXxhFfE3xb3L5Tko5xVivHIc=; b=Ng/XnkZh+vNjltW6ZVmXuOFac4c4Z3+RfcHp9LZYxE6mbZmfUdUF17KJUvmvFLyHIC nob/rrnrvbJfLs7FwnrQUAsSK788jAIPgutWqjZCui+6AJFY0I8v4xSWPCBXD69nZQWH T2cMa0UUAHLpXPLLawDB6PA/+zwb/sJlpz457gysDr2+RpILG9/sKMCYFS6g0E5daUju Ub0bapadZ9MWLsUGrcTYHkCmAKJ30SE+b4a/VkIUZcu1V/w5VOgiU19gojeEyLRbp81F vjqfGhIptOoi5966fwmscaXohTUE3pO+5EH9uRZHt44aXKZ4DaB43jAu4knmELYfM+34 ZBmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="njnY9/ZT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji7-20020a170903324700b001ab147e4538si3547514plb.410.2023.05.03.13.02.55; Wed, 03 May 2023 13:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="njnY9/ZT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbjECTl0 (ORCPT + 99 others); Wed, 3 May 2023 15:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjECTlY (ORCPT ); Wed, 3 May 2023 15:41:24 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6F5E7AAD for ; Wed, 3 May 2023 12:41:21 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-b9ef06cb784so2160072276.0 for ; Wed, 03 May 2023 12:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683142881; x=1685734881; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7eRiiP2JCtlxvX+BHzTjXxhFfE3xb3L5Tko5xVivHIc=; b=njnY9/ZTWcA0YQLoTf3TUMfGQMs6qBR8x/WiO3YJ4m2rgzn9gPgiVmWeEd3meHgQOd veIE13lp/BEBibiOOZUNO+WD2iQQwInbq0mORyd3+wLWSUTFkhmbMs6fl3Tqmd3D0D5p V+y4b3/jKL+G7UEO8JQopzaWcrHdBR+imlq/VrwTOp1569eYFHFfi9pD7I53OyaoPSYd tj72nQLogAXIm5Pv95noTQ1YRpRrtHa+Dymto/1ndku51s0fuH/R0nkRvqq+7WbyeTBe or08gvlkQ55RtNC4M9pq8YNpCVr1Dsrvti1RMiJ42Ynp3MHUq3DPU/4MOuwmbk5VuygM Oy2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683142881; x=1685734881; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7eRiiP2JCtlxvX+BHzTjXxhFfE3xb3L5Tko5xVivHIc=; b=K1eDU9wblCaJggLArlz68BcQi3TaYhwcEJ9LoqfeghfXPiD548polHF7zSOhB1bJWE oZ3ldFUS3t3v6ceSGmvQ+i+G8F7p/bA7GxeBiHl5yiwtYU3tHHMC61NAMSuXDTdhSSFq WfBeB1Jq57fv6P5JMN3HdGmo2L1bndqOsa3SeD9jjlv3YDgnaUWqnH+E8WoacDdwoGmC 6G2SRQvDO/ywZ271Mt7qVNRuTY4v6CsqGVarOI4Mrr+LgU5gLCTMhsaxcctPlXOBFPhm TvYBuPLTZBUXSQM9wcWtYLoT/om+ppnjiij8cPfmOfl3rFKhl6i7cvMLZCs+IxXjlZ02 EHiw== X-Gm-Message-State: AC+VfDwos4/Oc2xFfI8xSJrHSC6pXu1NWu5GBux72pAbtQdm9nkmkX+W qSPuVKoK989SgJUonBYni3bv33EnPkwOIZp5hsbTmw== X-Received: by 2002:a25:308a:0:b0:b9a:38b2:8069 with SMTP id w132-20020a25308a000000b00b9a38b28069mr18330170ybw.6.1683142880244; Wed, 03 May 2023 12:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20230503180726.GA196054@cmpxchg.org> In-Reply-To: From: Suren Baghdasaryan Date: Wed, 3 May 2023 12:41:08 -0700 Message-ID: Subject: Re: [PATCH 00/40] Memory allocation profiling To: Tejun Heo Cc: Kent Overstreet , Johannes Weiner , Michal Hocko , akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 3, 2023 at 12:09=E2=80=AFPM Tejun Heo wrote: > > On Wed, May 03, 2023 at 08:58:51AM -1000, Tejun Heo wrote: > > On Wed, May 03, 2023 at 02:56:44PM -0400, Kent Overstreet wrote: > > > On Wed, May 03, 2023 at 08:40:07AM -1000, Tejun Heo wrote: > > > > > Yeah, easy / default visibility argument does make sense to me. > > > > > > > > So, a bit of addition here. If this is the thrust, the debugfs part= seems > > > > rather redundant, right? That's trivially obtainable with tracing /= bpf and > > > > in a more flexible and performant manner. Also, are we happy with r= ecording > > > > just single depth for persistent tracking? IIUC, by single depth you mean no call stack capturing? If so, that's the idea behind the context capture feature so that we can enable it on specific allocations only after we determine there is something interesting there. So, with low-cost persistent tracking we can determine the suspects and then pay some more to investigate those suspects in more detail. > > > > > > Not sure what you're envisioning? > > > > > > I'd consider the debugfs interface pretty integral; it's much more > > > discoverable for users, and it's hardly any code out of the whole > > > patchset. > > > > You can do the same thing with a bpftrace one liner tho. That's rather > > difficult to beat. debugfs seemed like a natural choice for such information. If another interface is more appropriate I'm happy to explore that. > > Ah, shit, I'm an idiot. Sorry. I thought allocations was under /proc and > allocations.ctx under debugfs. I meant allocations.ctx is redundant. Do you mean that we could display allocation context in debugfs/allocations file (for the allocations which we explicitly enabled context capturing)? > > Thanks. > > -- > tejun