Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1215653rwr; Wed, 3 May 2023 11:41:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Miy1Xh4VN7w8xU0IDmbfHTvk7xkGn5SM6jfIf6Ecs1EwMBgj1UfYYglZwgoEjQp3PxrRC X-Received: by 2002:a17:903:120f:b0:1ab:1dbe:20ca with SMTP id l15-20020a170903120f00b001ab1dbe20camr1279068plh.56.1683139305673; Wed, 03 May 2023 11:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683139305; cv=none; d=google.com; s=arc-20160816; b=Slo1eU3hxJds+TADDsp+vW7DQlf2XHRbmkiSw5k38g7EsYdXo+Ztl6qqOdbZQ2WK8V 9P3NDOlIBHxy0NgoZ6om4CkeA1+ejO9UhC5O4ZWYWF2UYg9a8GI0dJqleU3WisgBdmvB P8LtgSRfF0ks4y7WHX+f4eJRRtQRpkx/Nbze8h/guYJ9kV/9lAy0RKkL8KMID7yZWtjJ zz7fLJKvIT4ZpwODol5WOCvDkkNlBjmE1u8H9HgPtPdHMXMlK1/tlQ0UeI4AywZWtl94 VJTwU4REIbX/VweyVznVM4yvGGtNxAMpIUyUMvYySgGckZcHilfhC1YF4q9yF5os7Pkt vlwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=sQ2ADeO1XgOmj5DxbzjpzikYpUTn+B695qqaLQsTl4A=; b=oTOi9obt9iA/tJz1+u/NAwoI6JTBi01ybf6Bz5I5ArAiYiRvZJwRZDEtmXR02nNrRq 96tNw15xT/eIOFPqvm86gYjzk/XkgvxUYtUuHfUsoHZVA4NWHKRp6pzJg80UWtVvNbxG j8+7XCJ+9SpRjK2OWuMk/vqliFAFPBFA78FCGsB8A8k/oMykJPynG1AAhft4PNWyeYT7 mYq42LI6nhvHQSChSz+EEwg51InvkdUAem2Ur4rJwqnAp0kzFDNwk9EyNrdQmG9n6CVn PMy46emMzYrJajQReS6F5kTaDPQv1uwX4zbm9A14obYyeAhXx7wFLNFgVsIptosWm1KP mK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=FAsEakod; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a17090341cd00b0019a7a67d312si22535001ple.454.2023.05.03.11.41.29; Wed, 03 May 2023 11:41:45 -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=@gmail.com header.s=20221208 header.b=FAsEakod; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbjECSkQ (ORCPT + 99 others); Wed, 3 May 2023 14:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbjECSkN (ORCPT ); Wed, 3 May 2023 14:40:13 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A2B8658E; Wed, 3 May 2023 11:40:10 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-52c62a71541so761147a12.3; Wed, 03 May 2023 11:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683139209; x=1685731209; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=sQ2ADeO1XgOmj5DxbzjpzikYpUTn+B695qqaLQsTl4A=; b=FAsEakodIYGZZ49hzhHq8Do+4wt23WK6jVIu98FKgEcC2IC28Yv1qcpIguYdAHmL41 K6QXYVXYY9e0ydYBW/QaYBQ4kV1sgRKD0Z8m7VqP9eoT6OyuI2TEKLTHxSnuPoZ0/P86 Ak//1N2uQgFgtt5vHB1OZ1Yr9lZGqpMPiXmn0PLHivzD9gD6C3pgBiZeck/EvcUad+D9 AIqIEi6ySYiJEa/rjzcr1BnwS0cO5uVLCgZHYd00/2Qp62J0+g0bDyAUjzMrqC8es9RR PvNP8hKoKyN1VyTkZlWwEOSIbNVu+bisxPnpdL40o9ZuYAjxbUCiGJrKy44Q/i6wCbvS 6MJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683139209; x=1685731209; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sQ2ADeO1XgOmj5DxbzjpzikYpUTn+B695qqaLQsTl4A=; b=BvoRPokoSMiVkbPlmALA8hIQW0hWkF3BGtAu3Whene693AAih2RPESqRgP9aO3X3wG youYRS9jUoIPpTqC/k45VBMmpds/sXb2OY5BDLIrRiyK6jHqPmCcHaBiWZYN7gZV5ZHr b7Cs9nIDJpdRLLmouDPWU+pUpS1arKk9lDmbCuvthKKckqvkeFLejrTePCsU6GWcVxRH iD8Txo/yYwibavRal1PSN5TGBADpMjKOhUVDHQayB+SwafDV4c1PxoUiVHjqsQo/Cz9A nNugKaMvBgsS2QhRLXTuw8Rh0caR2/ahG/5f+t4AAjzKnSJ/A4o/BOixSFrekxbWXbeF vUCg== X-Gm-Message-State: AC+VfDxdx6rv5/vxaJT9N1OkMtov+3uywXA5fICrcvDYyDTdMtbE12dh oA6SrYnEtMhbXeyWNwJa7ng= X-Received: by 2002:a05:6a20:4286:b0:dd:7661:fb34 with SMTP id o6-20020a056a20428600b000dd7661fb34mr28426673pzj.51.1683139209307; Wed, 03 May 2023 11:40:09 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:6454]) by smtp.gmail.com with ESMTPSA id u22-20020a634556000000b005287b22ea8esm12540790pgk.88.2023.05.03.11.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 11:40:08 -0700 (PDT) Sender: Tejun Heo Date: Wed, 3 May 2023 08:40:07 -1000 From: Tejun Heo To: Johannes Weiner Cc: Kent Overstreet , Michal Hocko , Suren Baghdasaryan , 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 Subject: Re: [PATCH 00/40] Memory allocation profiling Message-ID: References: <20230501165450.15352-1-surenb@google.com> <20230503180726.GA196054@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 03, 2023 at 08:19:24AM -1000, Tejun Heo wrote: > > Taking a step back though, given the multitude of allocation sites in > > the kernel, it's a bit odd that the only accounting we do is the tiny > > fraction of voluntary vmstat/meminfo reporting. We try to cover the > > biggest consumers with this of course, but it's always going to be > > incomplete and is maintenance overhead too. There are on average > > several gigabytes in unknown memory (total - known vmstats) on our > > machines. It's difficult to detect regressions easily. And it's per > > definition the unexpected cornercases that are the trickiest to track > > down. So it might be doable with BPF, but it does feel like the kernel > > should do a better job of tracking out of the box and without > > requiring too much plumbing and somewhat fragile kernel allocation API > > tracking and probing from userspace. > > 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 recording just single depth for persistent tracking? Thanks. -- tejun