Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1685843rwr; Wed, 3 May 2023 20:34:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tt9FoCsJZioSkvq4jQvaVjx21y+Y7eNY33cyBPXSrR/0PLYs1hKqptJpyGfpUSCdftMsP X-Received: by 2002:a05:6a21:328b:b0:f0:a8e7:bbee with SMTP id yt11-20020a056a21328b00b000f0a8e7bbeemr1101752pzb.1.1683171283995; Wed, 03 May 2023 20:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683171283; cv=none; d=google.com; s=arc-20160816; b=RJtPoogjqW6XwBKcyOwYht35/juLoP4HJ8tF6MxThSWOgvICGE7cjRuJ7iZ9HZTaUv B1jZTotDb8ChVtNMFrWDNXcnsiZb7KcCANA63sDh3Gw8jnopzSVkW0C7/jOL7S0CsuVl uq2lBo0oY7CPGZMgVGm5wKnKd4NIh44d839TZCzwH3JV9PUwDqyQIGlDpb5jn7Koit36 aZvWFuiiaUTR1fUP2MLfYUigXyH/v8W2CadRcfBZ/GLkRxhC4tD/Ihd9Kedj+M99cxNf 58ilpK8m6/chJBjxXnc5bfximDiesTZY4e1bW+CeXZEsPcKjq1OzMPMYFEYb1ZbGl8X5 k5JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=LHQ0tWOiBXePRONe9lmx+CgLFkYWwKAc8GKV4/q6DkU=; b=lM+6kMgeHy4e/wbLHltqhFnTW8m7u7kHW4leVg7caRKelFLXdETaDBYg5m90Ur6V/f xPUY1s1SZoawzBcPfK/LnsckGTvbrqbnYJuluKro0j735SaQN+n+Pw3sSjVaKVe3tHVa AZ6PvdTV8uuksUOumTLxkBICP//0J2mcCpjFyV0k6nRnnD7/kQbZ+N4rWR2IaO/PEnkc QNog9rJIGJ8Z2OkJ/rii4Uzd4hO5NWV0j1J2mHLFDjg2FNFNkRvQslWcM2nHBbQkDvB5 9qYsVZJ/rRl7ruKgRnX8BzaInhAnK1sZQxljAdPrLLJuBiwNnyaaLNLBt4MYEOfrL6DL DnaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=l06qAFau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 132-20020a63018a000000b0050f89421524si31581602pgb.319.2023.05.03.20.34.20; Wed, 03 May 2023 20:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=l06qAFau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjEDDdd (ORCPT + 99 others); Wed, 3 May 2023 23:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjEDDd0 (ORCPT ); Wed, 3 May 2023 23:33:26 -0400 Received: from out-61.mta0.migadu.com (out-61.mta0.migadu.com [IPv6:2001:41d0:1004:224b::3d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95CC819A5 for ; Wed, 3 May 2023 20:33:24 -0700 (PDT) Date: Wed, 3 May 2023 23:33:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683171200; 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=LHQ0tWOiBXePRONe9lmx+CgLFkYWwKAc8GKV4/q6DkU=; b=l06qAFauAqEclo8mUnMY1YCLzbbmHnEvV+EY2YNo/5E9metuAhrBTLBNyKmDyPjBL96oXJ Sq2/N2krXfhJsoBkaVuwKvWwKl+Fg7w6P6TtEkseIUokAAnEnnzKptcyVqwX1hev7IGajp 4Qgb4H7pO+N54e9Aq5/qIaonS9LZ9yQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Tejun Heo Cc: Suren Baghdasaryan , Johannes Weiner , Michal Hocko , akpm@linux-foundation.org, vbabka@suse.cz, 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, ldufour@linux.ibm.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, 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, 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, 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, Alexei Starovoitov , Andrii Nakryiko Subject: Re: [PATCH 00/40] Memory allocation profiling Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 03, 2023 at 04:25:30PM -1000, Tejun Heo wrote: > I see. I'm a bit skeptical about the performance angle given that the hot > path can be probably made really cheap even with lookups. In most cases, > it's just gonna be an extra pointer deref and a few more arithmetics. That > can show up in microbenchmarks but it's not gonna be much. The benefit of > going that route would be the tracking thing being mostly self contained. The only way to do it with a single additional pointer deref would be with a completely statically sized hash table without chaining - it'd have to be open addressing. More realistically you're looking at ~3 dependent loads.