Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp386154rwe; Thu, 1 Sep 2022 00:46:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DkPJAYxSXbdlaGhMGzXewYp4HOrKPiezLDBjMOfdy5QibtS0Dw3ZXmnZuHg+FCuJbXhnz X-Received: by 2002:a17:90b:3b8a:b0:1f5:1df2:1fff with SMTP id pc10-20020a17090b3b8a00b001f51df21fffmr7393691pjb.169.1662018362523; Thu, 01 Sep 2022 00:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662018362; cv=none; d=google.com; s=arc-20160816; b=kun1fRm8iEKJVgoYHAcFskUFXfTwF9u+VHMKoMiPcAQY8NCz/i+5Dn5EqLD4rVXJHS O0qBTiHUbf0J6sqyIbl62g/npt+KVpLylxp0dyuk9hr+DAfX0EHxvz+yRcJYpHZsMHnE qAFMnDtwCtleqZj0YIbErHqf+S1yv+InjUbKo5NIdpohNrpSonO4Eg+9UlpYtiLqZzlm 0MYiC48KJDymt0nKGyfAEKQX6cSqDR1LN+fzNL/ezchVp5GZgT7VH84QvOABe5Kt0LDj Tm+joClkVpCdId5vQX4mjFop8yUdvarJXu3UMqk2vCc1aeTf4u/X7c4C3cSzhwowcOS5 +pNg== 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:date:dkim-signature; bh=qqD5irythXcXnrZi3fFnP54DNBcaxZAOs7bCGWArgiE=; b=pQUb8BVmGan43B+zJTYnUujYDWlBxcbe2tr3z4N0rCQY1IyT1DG2Tv91AYXWhF6q0b PNN0Mx6CqCBEQWzKYNYsjgknpyhtwrUD17Olc8gsAhfVbxBLgVF1aFGI4O3kbH13QLik eQRXcn0jin52mYSpkhesmDA1s/4b6wYZFpBZjZkBjFHGUiAYLjp4Si7wCChGCJTvcspb GOudBbIxpAZoWOkw7XFzNE/6xTwXqTsZIOAuOrOADDcg72hs6dAKZx1McitlaV8oIUEo no1IYdnzqJ10pHmrDFD4ScaeyryKms0NhhtY3RTgKhbuAtCJfjC90Ojy1v26VEu3i5OU un1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZhvYUfsO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a170902e8d100b00174c8f14833si9228884plg.82.2022.09.01.00.45.50; Thu, 01 Sep 2022 00:46:02 -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=@infradead.org header.s=casper.20170209 header.b=ZhvYUfsO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbiIAHlQ (ORCPT + 99 others); Thu, 1 Sep 2022 03:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233999AbiIAHlJ (ORCPT ); Thu, 1 Sep 2022 03:41:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3768310D4FC; Thu, 1 Sep 2022 00:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qqD5irythXcXnrZi3fFnP54DNBcaxZAOs7bCGWArgiE=; b=ZhvYUfsOVZfpS5Hal0dOI4T8sU PNc+vhmIUmOhTzG2jygS6fZDnv4E7A8cEH34MHu/GJW5fxW0FsWlJpiJjUenDHQqSnwxEI5GXxOfi ieFRy6iseDaQxWHqkKo+aE3IWTS2iT8jcbgwVHviCi1gvBk1EpqhUD/IxzFVA43sXpGAoI//tD4o7 DTq74As/XL+IUxAUoQcOMw9+Echuc+WtLNgyHhVHwco+lUUk18VbMVD+vebmmLUbv71Ofs9lwD97H rLOOmkKjdINa5JkLcdScQbPyypaLsZb7x9/x0p1oU1C7YpIc541zuWJSdEwkNQlWeNWbSa+YEesS7 0Tt++BmA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTeoy-005qNM-GL; Thu, 01 Sep 2022 07:41:04 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A96683004C3; Thu, 1 Sep 2022 09:41:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 925E52B871FC0; Thu, 1 Sep 2022 09:41:02 +0200 (CEST) Date: Thu, 1 Sep 2022 09:41:02 +0200 From: Peter Zijlstra To: Kent Overstreet Cc: Mel Gorman , Suren Baghdasaryan , akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, void@manifault.com, juri.lelli@redhat.com, ldufour@linux.ibm.com, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.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, arnd@arndb.de, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-mm@kvack.org, iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 10/30] mm: enable page allocation tagging for __get_free_pages and alloc_pages Message-ID: References: <20220830214919.53220-1-surenb@google.com> <20220830214919.53220-11-surenb@google.com> <20220831101103.fj5hjgy3dbb44fit@suse.de> <20220831174629.zpa2pu6hpxmytqya@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831174629.zpa2pu6hpxmytqya@moria.home.lan> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Aug 31, 2022 at 01:46:29PM -0400, Kent Overstreet wrote: > Because all the counters are statically allocated, without even a pointer deref > to get to them in the allocation path (one pointer deref to get to them in the > deallocate path), that makes this _much, much_ cheaper than anything that could > be done with tracing - cheap enough that I expect many users will want to enable > it in production. You're contributing to death-by-a-thousand-cuts here. By making all this unconditional you're putting distros in a bind. Most of their users will likely not care about this, but if they enable it, they'll still pay the price for having it. Even static counters will have cache misses etc.. So yes, for the few people that actually care about this stuff, this might be a bit faster, but IMO it gets the econimics all backwards, you're making everybody pay the price instead of only those that care. Also note that you can have your tracepoint based handler have statically allocated data just fine.