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 68D0AC4829E for ; Fri, 16 Feb 2024 00:58:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B18328D0007; Thu, 15 Feb 2024 19:57:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC7638D0001; Thu, 15 Feb 2024 19:57:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98F378D0007; Thu, 15 Feb 2024 19:57:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8B27F8D0001 for ; Thu, 15 Feb 2024 19:57:59 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A759E169F78 for ; Fri, 16 Feb 2024 00:50:41 +0000 (UTC) X-FDA: 81795836682.04.D489161 Received: from out-185.mta1.migadu.com (out-185.mta1.migadu.com [95.215.58.185]) by imf24.hostedemail.com (Postfix) with ESMTP id 8B380180025 for ; Fri, 16 Feb 2024 00:50:39 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=VQv3k7CK; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf24.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.185 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708044639; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mLCxs+brit7Xt9ohcQIkEDEwu4CGUrETZSQhOqg+Gh4=; b=E4Rqa/VwB8c7iPcgPU2C/Vhi9yIl7WXjGAqgjnNOJTeuTMwgS2vkAHLvN4fTcllTKTlHQk HKLeF3egLyFOKwGwtGQ4tOsoVJ6RZKhJV4Qfi8s+T1ymiV5WYgBxqHg/056Tb4UjHCfp/b s+gx/YE6NDpF72AokqEkp1z13ZbU40o= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=VQv3k7CK; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf24.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.185 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708044639; a=rsa-sha256; cv=none; b=EcmUWy9gYK60+8iImmhEKrLZNfPjAS3BI++N4+L156Reezg2MJesIUXGqeA0qNNnELpNI9 ZGt0ALTWhHkDmRz0hIO434nUZ5RFxbb0IDkaRenDFY/LpZ12iR2Z9+U2bna2DhzlCyXRYs a/qoeRIM4BftFMldfg5y1k72+lTajTI= Date: Thu, 15 Feb 2024 19:50:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708044637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mLCxs+brit7Xt9ohcQIkEDEwu4CGUrETZSQhOqg+Gh4=; b=VQv3k7CKQO7VvnNiO0UaPC3fRsfnv/HUGMdvgh4+aJJ2aWRJtV+YlrOeBfde8VCHgAcbY5 lXO47e7kbZbILN8ftGGc8KCEueNDr1rNHWaoOXL0Hdz+XHBXnlrz7urf5prbXjGBLGGyRP hi3yRo88y4QRr5f5p0UTWDtVOke68ds= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Steven Rostedt 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: References: <320cd134-b767-4f29-869b-d219793ba8a1@suse.cz> <20240215180742.34470209@gandalf.local.home> <20240215192141.03421b85@gandalf.local.home> <20240215193915.2d457718@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215193915.2d457718@gandalf.local.home> X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8B380180025 X-Stat-Signature: cxijkyj4q1ffcy65rjfjdh371pinefdw X-HE-Tag: 1708044639-297110 X-HE-Meta: U2FsdGVkX1+e9GTKqPo5hKJ+exI8TvbiuFLl0f22hyeM8LHLq7dTfstSowkDXHe+9zC4ydsRa45f+wJFv9zhDfZs63Y1Kk0k0sR4VK4at4lkyfEg/wHQU3wo6QFtsK9FgEPgBK/ZS4NjM1K/XIriRc/GJwXJTFZwNUK/6h4xCPF/1FMrIULucbWfsfeglwH+6Xq+QuFDaGVA9rNUu0EowfAmB3lOMs7Mk03izQ8/ys5BtbjUzks7m+a2NLh8JoEKQwssmlcqxlxqjBEEoLpu7PkrcTO5nt6Bv+sIy5L0FiymBP0wELXtk0Fk14pGZzfL4riOTE++KhZdOwejB+5PK3l0tkDR8u+pspJiuZpQ94pj8WFz5U38UM05M1VBPO0d4Tb6ZQw4rO9igfjCTK1DseEnj88YIrin+snb3GxeTXBZvk1NwYGaSLZcUeQHDZKyJgVjelO2WxzeycAylofVxY62KYJCzA+A3DbTEdXL7wZV4cQa59+uFx13QSKo0rCkFK4TFMqbJ9NvAvNF+F+59mWEer8JB75//VEep/+FIX29xRiI3j3pDQ1FOuwZZ5m/morpPGCL+OGbzTZvUDof03GX/Kg7AWjRW8Kmv6qjh1FNyyzftOhwNSYCsvmGyVtieT2dgumhrhqw4zsnU+/J7jvbhtnFh2M34vrwlrgVR+k+9a2CgVej6MMRBFqX08t3g/iW3zjVCdVpBiujmuqmmjKiS0e3ok8XuU2qFcpG/91SRuqR4gpjb6UoAya1VbbHlP8lYQaQBRWxl07NN/uDCqE7VZRP6JlqqReLubmPAgXURipWdoRbt5VWOk2DU9JqrCS5viYcimmtFrRK8W72sAUSxhMAdtaEjL4Ixa8t3JpuJFa99DhJJjUyUDCSAsBH5pfWzbZnzH9GdM2WjJYM4e/tGCfdrX5P4LqtmB2Bl7YEh9S6/UUrgOnsszd5Vq/SlSwibMruEucjv9/sDYB 0mUyMc6v 9oicFdy3gaHnUfrowrXOY6Girrj73VzldQhnaQLIKRkinnZOXJ9262GVOh09VXT9SHpgHPZXspp3dQkPMq6T+hqqG1Qwwyf0CjU1TBVKGEf4dRtSKSxNnShxnHUThNsMlLRxsJs4ZPK0SF1wzp7jGbBCO+vGsyyt8+HxzPUzN53EvIhXUCWQQhzvpS62Uo/sYiFcC 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, Feb 15, 2024 at 07:39:15PM -0500, Steven Rostedt wrote: > 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, you're being demanding. We provided sufficient benchmarks to show the overhead is low enough for production, and then I gave you a detailed breakdown of where our overhead is and where it'll show up. I think that's reasonable.