Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp803983rdb; Thu, 15 Feb 2024 16:38:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOQb5ifn0OtXBAgaWKmMgaXdrR5kjnpTCKv66uUCUnYsroqo9tVJUlRSOfqGsZVY8kpOyOBRXrVaq4bS9gXee6L/rDLYPhvKXCD5PGYA== X-Google-Smtp-Source: AGHT+IF+foJyOrhWsGz1+m1TYMhR/L2DiYExxsb63RIH7wCZSgWc+II4sr/EwB2nVo1roXQyFFuh X-Received: by 2002:a67:eb4d:0:b0:46e:b32c:8717 with SMTP id x13-20020a67eb4d000000b0046eb32c8717mr3459956vso.19.1708043883689; Thu, 15 Feb 2024 16:38:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708043883; cv=pass; d=google.com; s=arc-20160816; b=FG7AEG67qqaGaldVh+LfSq4RB9P4bpuqczufvF2Z5ldkbcMshhOzcZvbZZRrjRTIW+ TS2qAJtc9xFm8D+IBb4DOE45DIiilCwCezxCmFTrQjMMSoaIN/Wcse6GpAC57C3MA6cQ yOBaaZNe2LQp+4ddZUWW/8IBONboQUJyEpL/8AK/XnRR4/qNls02yAPHdZ8woE7jAI7P gdH3ayRUTP8aHUWFQI6OeOvk5oEWGlZ2Ri1VS3Bb3C64xEotJrIY2ATPCfF/BRt/QYFc /3XMrgJOrRZS8NHWNtoGTgaRBMaTno/+HfHrljJQjMjd+XInoRhGCHulPTeDxjPUSKHK WZVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=+nmqn9S1ASKA4C3uwsYXdX2JCiejoSQYXEKqWiLf01A=; fh=yAsR8mz6OHt7FqUIcMxTq2xSLRkYQrfOXi2SdkYqlko=; b=qVm4lYF3Hd9H3PKxhfjpjLjm9WU4IR/t0Zb4P2NjMQv4koZaGONdqNephBykgR8nbB 7/BITEuw77ckr3o2So0M20kdVeb0jN1xy+H78uZhUsUgOJHnu24ObJS2tF16WNug0ZhF 0kfnB06EDbZhuQPKytSViCPxBr6JzQxZaKCU4d0/2ynMHd1PusR3LB2dizCk8IBkqjSD fyU51sO8hdZFVF3MM6lDSScAEsHNcs7jliQsPTDwSGfmjXsCLuL+DYP0d6rqsGwmjEtl EPDDM63XHVaJAS2Q9UJ9irY5QrSzNTYoJio5qKkC/6gX/Tbg10Y8a2dffpP5VoQ5g9ef RqAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67899-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d15-20020ac85d8f000000b0042c4e226901si2866623qtx.594.2024.02.15.16.38.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67899-linux.lists.archive=gmail.com@vger.kernel.org" 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 725ED1C239BC for ; Fri, 16 Feb 2024 00:38:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84BA36AA0; Fri, 16 Feb 2024 00:37:49 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D7030A21; Fri, 16 Feb 2024 00:37:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708043869; cv=none; b=a0F0mt1W04lorHIU8xeOcRSM7he30RAwwE8Rbju1S+W/0MgY3rlfbkPa15k/JsViw2hoRHLeSKpYauLj04JIY+TdzRVpYygAtSQDuJlzQoZR3bZIzG73HMxxCBts+nRmoKpBFPFrmqZ3GW+L20bsqpszZWs64zVzo4h6yl2Z7g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708043869; c=relaxed/simple; bh=YpMrmy2WNszZOajuF+8g9MSTe1WwFvsOvg16QLWytFw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sNmOvAoJvr5pwPRGZ09iJyJBAzV2mVvBPipXBsvr6rgaSqlIwXuI9G43dSHPdyBgh6KZYpJKNdr+g98TkoKbqivgIoP1TBCGp/EDVyg0eoSWYKiK892MFUJwUqDGkcV5IaeI+n9HkmEapG6az5FdppmGRwItmNaUQWT3zJc5/0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 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) 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-Transfer-Encoding: 7bit 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