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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 094A8C4829E for ; Fri, 16 Feb 2024 00:42:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7D2E58D000E; Thu, 15 Feb 2024 19:42:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7831F8D0001; Thu, 15 Feb 2024 19:42:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64A538D000E; Thu, 15 Feb 2024 19:42:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 568898D0001 for ; Thu, 15 Feb 2024 19:42:29 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id AD6B9A6F79 for ; Fri, 16 Feb 2024 00:37:52 +0000 (UTC) X-FDA: 81795804384.12.AE20791 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id F0C8218000C for ; Fri, 16 Feb 2024 00:37:50 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=RKXr=JZ=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=RKXr=JZ=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708043871; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+nmqn9S1ASKA4C3uwsYXdX2JCiejoSQYXEKqWiLf01A=; b=ROqj5JnJ5gnZJfUIfDMMILXfmNyC9LuOXL+r7477eLmLnNLHrgZqV7poFPLa4cHh8jFtRt 1EfHdFTlc9CPcpOP0eHw0xSURfJ52n7pv8m5xk6kOo1+cRPgz4iRMrmUt9QngqXkkxuAFr lm9ulGKRiUk/U5DbIJrOGdrX5XQldbw= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=RKXr=JZ=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=RKXr=JZ=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708043871; a=rsa-sha256; cv=none; b=mTpaV2dxLbxCPjb/jf/PvbPtKU8DLi5X/EfQomDFqYLURVDVwhDfMM6+eW+lmjUme+EIjH JT+pqF1AA0dgtJTGTjFnJ2Obc9MTZUQPkAyErxOpSHXxaRMeGQj7eFQNOiEJxaHDgM218Z D6fdDIJlZmH+UZvZ+em5PmR0+5JqUXs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AC493614FA; Fri, 16 Feb 2024 00:37:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED6A9C433F1; Fri, 16 Feb 2024 00:37:40 +0000 (UTC) Date: Thu, 15 Feb 2024 19:39:15 -0500 From: Steven Rostedt To: Kent Overstreet Cc: Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , akpm@linux-foundation.org, hannes@cmpxchg.org, 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, 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, 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, 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 Subject: Re: [PATCH v3 31/35] lib: add memory allocations report in show_mem() Message-ID: <20240215193915.2d457718@gandalf.local.home> In-Reply-To: References: <320cd134-b767-4f29-869b-d219793ba8a1@suse.cz> <20240215180742.34470209@gandalf.local.home> <20240215192141.03421b85@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: F0C8218000C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 1qygk6ac534ariwj1fgu3raehmkca6n6 X-HE-Tag: 1708043870-182666 X-HE-Meta: U2FsdGVkX1+aA0pcFIT0M6c/6AiWghI9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3FIpq1kmXGXJaelLdjT0sJsn0V76XvHCBNqAmEr82hOBbJsMvOu5Upph5pJ6Mpa3wbejHMQpZWmfurQyitJY1dMlRyYD4T1eWxDUQ74ofZJG/oLj79+719/XRY/VdXyu54IxWsOgnvs2+gJVmbV+qdZF8Z1PSBJl0eVnxFAgHiAF625iIs7znQFeNwuL2ExGeaG6cJnkE2n8ygOkmbn+R9OR4/RK22ksnCWmjsOd8htRoIzNjr/rztu7YXzDlne0WFDtp0iOgQ== 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: List-Subscribe: List-Unsubscribe: On Thu, 15 Feb 2024 19:32:38 -0500 Kent Overstreet wrote: > > But where are the benchmarks that are not micro-benchmarks. How much > > overhead does this cause to those? Is it in the noise, or is it noticeable? > > Microbenchmarks are how we magnify the effect of a change like this to > the most we'll ever see. Barring cache effects, it'll be in the noise. > > Cache effects are a concern here because we're now touching task_struct > in the allocation fast path; that is where the > "compiled-in-but-turned-off" overhead comes from, because we can't add > static keys for that code without doubling the amount of icache > footprint, and I don't think that would be a great tradeoff. > > So: if your code has fastpath allocations where the hot part of > task_struct isn't in cache, then this will be noticeable overhead to > you, otherwise it won't be. All nice, but where are the benchmarks? This looks like it will have an affect on cache and you can talk all you want about how it will not be an issue, but without real world benchmarks, it's meaningless. Numbers talk. -- Steve