Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2829878pxb; Thu, 10 Feb 2022 06:32:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF1BI1tZyKK6WWGqz8LZOPf4I/oXuM+JxONOYcBso0W3/qXBFvRPrG7o0EfyPl3ExC6NHF X-Received: by 2002:a17:907:9716:: with SMTP id jg22mr6774006ejc.265.1644503544865; Thu, 10 Feb 2022 06:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644503544; cv=none; d=google.com; s=arc-20160816; b=fMq7UI7hHEnr16KBOXmAlfPnndPIpGAed0HHkGAyJIo85+gY5Ae+iD64wmZgkUANjh TgkjcLRazw4NhNMM6Pj1ed7SU9xK5ONLaVeYVdo3JH6HBKiM/xDypksSnDSXrvhrtVus b6xNzO4ZjXmar/CjuPC0JapbwG3gyCh7aGTMdgzuuSEfdZ8YVcVL0fsnxaV6Kqr/b/Xj 6jMWxtEPnVL+Plg9cN7iOZw6GLpluML7vPRuyMF6V7nTdtaXVYvGTW1Z9mx8hdMCk35p TLxbGR/yvkh87w3ilBH400xbYUDxMuG4CQYvVzK05B8737//Id97rn8FgNTWcaLBZVO6 nJqw== 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=WhfsZGHRyj3BiYrePm2T7nfqolEn4234PiR7dKjI6oY=; b=KzWunjGDa9Q39C1FNxByjhi8nCXqmclx4tKBxllCYotWRtQjiSUcnPYXAghHPYs9Nz yFz2KB5IGX9Ywxf6roDCrMA3n+i+WYMSYzbhmWXd7lyTtDJu6e1udtpyZ5IoFy778mmm ADhnl5fvrRI0M5HjLyAX9LaipM8S9DBTOKDCInCo0l6NCIExVccoTplOaCk3z83TbcH3 P9y8CvUsaQFk50CXFgpgKXGjcpz5luntaY8KCOpDVp1fuwo4mjxXn+9EWgiojS1XSmg9 LPSdPqSj9Af92VwKV12iD9gyo8hvxNLuQUa/ZiYkyb9iSPMlECMEIDTJs+UAK/WCdcxP 4VXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=q4NJZI6D; 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 v2si12042598ejk.653.2022.02.10.06.31.58; Thu, 10 Feb 2022 06:32:24 -0800 (PST) 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=desiato.20200630 header.b=q4NJZI6D; 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 S238331AbiBJJO1 (ORCPT + 99 others); Thu, 10 Feb 2022 04:14:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238298AbiBJJOZ (ORCPT ); Thu, 10 Feb 2022 04:14:25 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37AC9F1C; Thu, 10 Feb 2022 01:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=WhfsZGHRyj3BiYrePm2T7nfqolEn4234PiR7dKjI6oY=; b=q4NJZI6DxE2Kvi7IDsQkKmgYd+ CdvNqs4GIuOeJFL07OBuo6jwtRivpLI81AjuWAK6/X5/bATwaztFCccoCMOKOgc03i6EibzJI3zex jiDMkf3RS+yh8mPUne5xny6D2Hs+o1qHbOe3Pv8xVEJTTnWkR82+c2sVrEy5oTt+Ov89Jtd6yla1l JQmlCNuH0gck2TW8MO0xMhXcUQEkiPSaCSjD/eLqgX5JiM+NGur6WVyM/z3L/l2TnzwosdxIuUC20 3dBDXEmpxjcWUKkFe36yEwmqw0YpwEFQHpAS0mFAAPeVksb0F+hagIQzkB9qTmDOw9En54KjuiBnA zuhFipnw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nI5WW-008f0W-PO; Thu, 10 Feb 2022 09:13:56 +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 33B2F3002DB; Thu, 10 Feb 2022 10:13:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 04AD2201D84A1; Thu, 10 Feb 2022 10:13:54 +0100 (CET) Date: Thu, 10 Feb 2022 10:13:53 +0100 From: Peter Zijlstra To: Namhyung Kim Cc: Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , LKML , Thomas Gleixner , Steven Rostedt , Byungchul Park , Mathieu Desnoyers , Radoslaw Burny , Tejun Heo , rcu , cgroups , linux-btrfs , intel-gfx , "Paul E. McKenney" Subject: Re: [RFC 00/12] locking: Separate lock tracepoints from lockdep/lock_stat (v1) Message-ID: References: <20220208184208.79303-1-namhyung@kernel.org> <20220209090908.GK23216@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Feb 09, 2022 at 04:32:58PM -0800, Namhyung Kim wrote: > On Wed, Feb 9, 2022 at 1:09 AM Peter Zijlstra wrote: > > > > On Tue, Feb 08, 2022 at 10:41:56AM -0800, Namhyung Kim wrote: > > > > > Eventually I'm mostly interested in the contended locks only and I > > > want to reduce the overhead in the fast path. By moving that, it'd be > > > easy to track contended locks with timing by using two tracepoints. > > > > So why not put in two new tracepoints and call it a day? > > > > Why muck about with all that lockdep stuff just to preserve the name > > (and in the process continue to blow up data structures etc..). This > > leaves distros in a bind, will they enable this config and provide > > tracepoints while bloating the data structures and destroying things > > like lockref (which relies on sizeof(spinlock_t)), or not provide this > > at all. > > If it's only lockref, is it possible to change it to use arch_spinlock_t > so that it can remain in 4 bytes? It'd be really nice if we can keep > spin lock size, but it'd be easier to carry the name with it for > analysis IMHO. It's just vile and disgusting to blow up the lock size for convenience like this. And no, there's more of that around. A lot of effort has been spend to make sure spinlocks are 32bit and we're not going to give that up for something as daft as this. Just think harder on the analysis side. Like said; I'm thinking the caller IP should be good enough most of the time.