Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp809007rdb; Thu, 15 Feb 2024 16:52:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVkrIqcCCIQ0+1Q8uTRTMZtnoOvW3FmL3P/8NMYCGvgRn21df51IFLD7yh5vidT7FQmNPlcB2QdaRyx74/zi+2obNVudtgC4jcqz7RfMQ== X-Google-Smtp-Source: AGHT+IHvHt4R62MlcUt5eytX7Vpt5q5O+c+10qBSvIcABsbaXIZQbL4CTdF7r8u2ACaYZgePO/n2 X-Received: by 2002:a05:620a:a14:b0:785:7608:c9f9 with SMTP id i20-20020a05620a0a1400b007857608c9f9mr3275380qka.53.1708044768931; Thu, 15 Feb 2024 16:52:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708044768; cv=pass; d=google.com; s=arc-20160816; b=rDIQNz7iKiAygJbG8eGhAZGmH7WoFrjCeBBBKxdM8orQYqxzApL1NrZfuEAfFte2CR xRbA9Ltu3pIxjvB2NEZg8qbxPbWVv5I7y38wOpKZ9zJtJEcdOcZwXNw1aZQOj2+ZrSbY fhDJIdBQLosx40tIRLA0VgDGqjWhnVM4DQjrICSit/8c6BwcIOufntMlgqtC4wmzHVYj mfn5MA3vQYMjXBjJl4fOB66NIM0iT9rmDYYanorypKFFulPRNhMYfaDUhtgj14Ur4yo4 oSExgNgEJFx0LIWrB/iwIg7EeRkNQkFVUrWq52nj4Leqz5BqUwM6HmvRD1+5Q6zQfLTV 0CnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=mLCxs+brit7Xt9ohcQIkEDEwu4CGUrETZSQhOqg+Gh4=; fh=OiwBIvYIPHGDMdlNleqgT10F8L7VFJzUbQ6V59nSWw8=; b=xFgMFagXik2BQTzAGMISUAhgVXc+k041VxH8qPhAb0UyubJanOmq72KlnxhD1Ezukd bEttaD4CeUHL/rK2hbojmeGxLA04SJfYl+5AzyyRkZ6bh6Py+e6XabqLVyVhp6lTiUK3 AKkCrFsaIE1/FjoibIm5BQrlF8mPZBYUwnMtAT07nLOK/tGnpl+Z47n9OpDeTDywccVl HA/T4ReY2pzJ4R/7ZmTky5tiHFj5xM+g91iKbfk08NxVQH6FUphxkPJBT+IqGGOhdLGT JZUq/1WjicJ2lEfP4wWAiIFMTaTnRnSn/1cP3L/h6HDwUZ/2pSguoifms5PsNiUpAo6e IaZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VQv3k7CK; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i19-20020a05620a405300b0078596a657d5si3022119qko.303.2024.02.15.16.52.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67909-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=@linux.dev header.s=key1 header.b=VQv3k7CK; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 878E71C20D13 for ; Fri, 16 Feb 2024 00:52:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFB1510A08; Fri, 16 Feb 2024 00:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VQv3k7CK" Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41A17101CF for ; Fri, 16 Feb 2024 00:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708044641; cv=none; b=LXbC1XqmYGeTN+XoNiE/t9CMGV+tKfbclOyQRNFfsVF9FppMkrKlv+vH/FPkyINoIeAZtf4rmNyepnVi7ZWRu24RPHRbuxR89t1VxFYf1GHC5QhLlcXfVCuyjPNs2/Qxd35Saxh0Ed9uBoa53PizEMU6xSoIveNTIFpwrWKOYH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708044641; c=relaxed/simple; bh=yJvazTFR+86hv5uLjPrGm+ajAykGtrKmqRpojL3XFvU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jAi9NoX3IB5ynMm2LfTI2fkfHHRa/G3vBvLxPQ46p9jmR0RnfUrUjIRYe+dnLriHbZe1pzwQ8JHG7k9dSr08x1exUHqAVegOkI3PsROfVcdV9NTj8gPtUAyZIoinnpjNPYJcfKefunXHuS5laAGP4VYBvy+Z+H0OmmgwgH9SWVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=VQv3k7CK; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.