Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp738834lqp; Thu, 21 Mar 2024 14:09:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXei236ng43kK1eWxecyGslxn31Da41MaWPMbd7KkhNG0CUpT54n+/Onp7QELCapqTY5tbaxTp18V/+BpBnjLHVbhv/6jddJL71XIrFHg== X-Google-Smtp-Source: AGHT+IGMpk5g1Nq7XwqkjB97WvzKgFcRjz5TPXumJkSqgYDxRjp9BlOr/IANXdnH/lFAiKCKQtBw X-Received: by 2002:a05:6102:3914:b0:476:cf48:da9d with SMTP id e20-20020a056102391400b00476cf48da9dmr1066877vsu.4.1711055349617; Thu, 21 Mar 2024 14:09:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711055349; cv=pass; d=google.com; s=arc-20160816; b=btnXik4SepgCwuuTG7LA7pMmuTKmlKo9k4KAQmEXhi7aSCEfOEBptDkBc1VjlTfrXU kL0t2+bKtejvA+X9CKd2wjZ7DkCJkmJaY94WCOnM17RrfoQ0D+KRkUQJtRo3dSlKg4Gy ijoIcpvnWRI1rzHa7dOlD36/djGkyeg9I+Fy7Ndpptm8pcfe2pZJ4D0x96sDVj1dnJkd GTvPz0Ggt3CbPNOmU10Vhi56DBePS756qlHhzCQZpNX7sv21jU5b3/ew1obTBfLQYUM7 uHkhlpVdoq8PQygIcNv01eZk+8teZ+n9jfKSYgct7hoyLCcFQye+1r+SSQVgZyzL6yW5 IyZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=NRNPrWHMxiQDcKwm3DA9WZxrfwYc+pk9Whir/OXbLVs=; fh=9CVCcZJnnXJgtfxdMDd8/9TWiX9eKTDQo/1+6sMCAMU=; b=ToDfx5fOkaqe2IyKQXCdq9FjIff+TMN2UT4S8f2AzmD2b04N14v+lMgelFh1mt8Hf2 GhM0G8Ni038gCs3Jk5ztTZ/RoMbio3D4RvVGXm9nIylTY/kPaj8qooS4DAChl42JLbzZ scpgZGDU2YFus99K2R+7cw9SQTB2R+S6ziuPLfGrn3F9iI88gNemcU4KkBlqxMnO05Wy FPlGnF6dUZ7LrPiVIEyMf2VxrjUo4ZMsb0Dn0jVkZs4n6+iXFFE2SCu46pm8HjzWkQyO gRaX54o365q0gIl3vSb0bfO04SO1dMH9DCx+QnnnHnv2ZSEhTWe8lSH0igv4DCkJ18L0 PN8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="vH7+jQ/m"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-110675-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gy10-20020a056214242a00b00690dcc6b0cbsi650993qvb.389.2024.03.21.14.09.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 14:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110675-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="vH7+jQ/m"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-110675-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2F2431C20B60 for ; Thu, 21 Mar 2024 21:09:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E238F13665B; Thu, 21 Mar 2024 21:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vH7+jQ/m" Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F040C135A64 for ; Thu, 21 Mar 2024 21:08:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711055331; cv=none; b=AR9ypWdtx89m/4NS8bG4+FFfXCAv+hIysxWYKvGRpjG8/OaCuO/q23Z3rNy1fjUvQXbO9649HLiZ47Y02/6ceDrUqVCa+i6RU9l/bxyCePVtXo3qDr7l+4viFNyybumTN887XByfHwShpnqQbAudwIjToHM9WULgzrolJq0p6GY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711055331; c=relaxed/simple; bh=y6UZilsub+NKtJrG/hhdATKtBTFYxelRy9AM56Z6Tnc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kcqhj8Q6rlUUDcpfTkqVF08NvmfBgzqiFZ7njwLUwLmuM3Nl+GNuN55cllvxy9kuiIrjli8usJVUulHl5lMZNK6D0wXu7rPIRxi2JIy0PIz8whaRgX2fB2fKUYJwYvkd2pVTo/0j5AGqj3ALSjooJVB+C5g2tsaux8Q4MeVMf0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vH7+jQ/m; arc=none smtp.client-ip=209.85.219.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-dc745927098so1330877276.3 for ; Thu, 21 Mar 2024 14:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711055328; x=1711660128; darn=vger.kernel.org; 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=NRNPrWHMxiQDcKwm3DA9WZxrfwYc+pk9Whir/OXbLVs=; b=vH7+jQ/mO3HDEunRoRopDRQGT701Z3nvOVF1j7zOjH5gTdnLOYY96/qQqQyBmtiCtC Jm6ZLEGAqlXxQGAa7w3PllnyFtErJLdlUpgIkeHGCtk+6dGoBdESjarQULu5UGpgZV22 VKHwZz78l/9Y2UuN+Pib7YCppcefS4lXi0+Tb2gRo1c1QDrpjYxqv2K3zpckzuwKEUUQ X8tQa8dX7Q5hgNZ9RJWGfxVsM7cmFqoR1gznhb7h3i3C5fkTWtC7iTKPqvKWahBAawKD qbU15dLn3n1/aXMHW47aVqTwjlO8GGg4nRB1PpQTVu6CAeGwsB7K87Mny5Y/JpvUU6+c aIEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711055328; x=1711660128; 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=NRNPrWHMxiQDcKwm3DA9WZxrfwYc+pk9Whir/OXbLVs=; b=V/W+rj+xZHccVf+LQVX3CUqIwzTIA9tS4DoFWfjMIzRVdvX7iZHG7Goi7a1ZSn011y 8Sf419k3ENFAC5X45cQ/zWMOduTiWas5PRLeWBGtboS2309McXpNkQxiyvYpttWQif2a KJh0EMBPv2RsIG3OSnv7ozVzAXXkOeZpfv9DRXjy617q6AOJsF2Cua/WpMvNbop5E7ca Tj3r8x2b7WQsOq7ts3QIUolIUSaTNa/dXBFmxK4O5BJB7L4V4PLs7i4k0rSExZV/9xO2 q3VZjD5qpqoRrLJAaNUzWwMFJ2oANpwS4hpSgFcycOTmvCTqQclWhmnQGA0PhNVrMiCd Wpww== X-Forwarded-Encrypted: i=1; AJvYcCWpZFdgPne0OhTbRg+W5h59qz+i9CHPtWkp2xzQ72YlCpMHkWyB3Szm4EkUpzcII87u1ibs+LFG9zFhRI8phhosb5ML/BfDMJNZ5zRq X-Gm-Message-State: AOJu0Yw8Dc5IiD4Z9FULLuloB2ysPtlJ8DHUZGA++C7jSRHjbD5JQNCB /mou53/csyEnctmBRRWYlqok06HVFnKW5qVpYLro7u+bUe3g9BXSaBJxYdNjMWgO1EJER3J42PR pgS1wOrV6oZHvN98IckHjBnGBse9TqqZGA8QG X-Received: by 2002:a25:6903:0:b0:dcf:f78f:a570 with SMTP id e3-20020a256903000000b00dcff78fa570mr390215ybc.7.1711055327530; Thu, 21 Mar 2024 14:08:47 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240321163705.3067592-1-surenb@google.com> <20240321134157.212f0fbe1c03479c01e8a69e@linux-foundation.org> In-Reply-To: <20240321134157.212f0fbe1c03479c01e8a69e@linux-foundation.org> From: Suren Baghdasaryan Date: Thu, 21 Mar 2024 14:08:34 -0700 Message-ID: Subject: Re: [PATCH v6 00/37] Memory allocation profiling To: Andrew Morton Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.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, jhubbard@nvidia.com, tj@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, vvvvvv@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, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 21, 2024 at 1:42=E2=80=AFPM Andrew Morton wrote: > > On Thu, 21 Mar 2024 09:36:22 -0700 Suren Baghdasaryan = wrote: > > > Low overhead [1] per-callsite memory allocation profiling. Not just for > > debug kernels, overhead low enough to be deployed in production. > > > > Example output: > > root@moria-kvm:~# sort -rn /proc/allocinfo > > 127664128 31168 mm/page_ext.c:270 func:alloc_page_ext > > 56373248 4737 mm/slub.c:2259 func:alloc_slab_page > > 14880768 3633 mm/readahead.c:247 func:page_cache_ra_unbounded > > 14417920 3520 mm/mm_init.c:2530 func:alloc_large_system_hash > > 13377536 234 block/blk-mq.c:3421 func:blk_mq_alloc_rqs > > 11718656 2861 mm/filemap.c:1919 func:__filemap_get_folio > > 9192960 2800 kernel/fork.c:307 func:alloc_thread_stack_node > > 4206592 4 net/netfilter/nf_conntrack_core.c:2567 func:nf_ct= _alloc_hashtable > > 4136960 1010 drivers/staging/ctagmod/ctagmod.c:20 [ctagmod] fu= nc:ctagmod_start > > 3940352 962 mm/memory.c:4214 func:alloc_anon_folio > > 2894464 22613 fs/kernfs/dir.c:615 func:__kernfs_new_node > > Did you consider adding a knob to permit all the data to be wiped out? > So people can zap everything, run the chosen workload then go see what > happened? > > Of course, this can be done in userspace by taking a snapshot before > and after, then crunching on the two.... Yeah, that's exactly what I was envisioning. Don't think we need to complicate more by adding a reset functionality unless there are other reasons for it. Thanks!