Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3118057pxb; Thu, 10 Feb 2022 12:43:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRLZJv3w0t7Ya9uh6YFZPa/PPXwCvvyOHa0syBTCYfJphkpQpmbFkGsAYU3xdkC1JsErff X-Received: by 2002:a17:906:7383:: with SMTP id f3mr7726563ejl.687.1644525796275; Thu, 10 Feb 2022 12:43:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644525796; cv=none; d=google.com; s=arc-20160816; b=m+rRhHYWpv8COamhjW6XwbtpPlY0vQ+tSOrMCz/SCwX3zEk9zJW2KJqIlgPzi/AUPB t7T9O5jDu7+UIdv83B2nc27BAqBRzcUwTor5vr5xfIxpCg6v63v3c2FIQEJXVFXrL81k GyWOyV71TDWVxDCqF8kH6/JoUkqm3JTVJnPNNG//yOOl/kWPVk+N+dbLw9lwa7dCDucg 3bCW0b2if17FQoNsAxrCDnTd7Jr9CVMkXMYabqXFQvInDJ0ht0lUDjK5S/AtBv5tfGaQ FlzC6evbwegC0xEtmSKJON3eglWKmfszJ8QkxoKIUukwdGn25z79tPe7n77L3JRopm7B u2cw== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0FI+bmvoPfFGQMY2Elk0GaOB6RBbM5Bl4SWnM/IeU/g=; b=MGoSCl3RwlTb5QjHtPYU7QaeOgopyhYFfbF1Eg3zHARCMLsq8XfCv7x98KeGl9r9+e l4u67oHK+M/k5231Rz4c1yt3XC+NwKSsyM8Ivh3b00848a/TWtOgumrkdhXVAImcX2Nk e0m4C3HxHQwMkzEyKf9iRcdnTqhmRWFqBCj3MFmaD1SMNh4lG0YMQA23lPGS37FScIN2 gT/EY9XGO0ZdgNLLTg3NEbJQq4vfdgGGBirt7RNZBf/oq+WNpEd5x6QPBljwQDsbi2N0 7nD4vJ1TtdK+oxS6yij1HJRHZGIxkXqGYhUqsxsE4c3jdE2KTYhYzmpwd6d5OT8NY8VY Lnbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m3ZVI2AA; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8si2910771edb.487.2022.02.10.12.42.52; Thu, 10 Feb 2022 12:43:16 -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=@kernel.org header.s=k20201202 header.b=m3ZVI2AA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343794AbiBJTOI (ORCPT + 99 others); Thu, 10 Feb 2022 14:14:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245101AbiBJTOH (ORCPT ); Thu, 10 Feb 2022 14:14:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6861C101C; Thu, 10 Feb 2022 11:14:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1C81AB82728; Thu, 10 Feb 2022 19:14:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE1C6C004E1; Thu, 10 Feb 2022 19:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644520444; bh=WjFROMNd1IDU206aRk23NJcrAg8BywhNavE19EBdG/0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=m3ZVI2AAQHOMjrcCGJ6VwrOluEThb79Sq2erIf7FUBaapEDlc4eWMhD0fOg+xoHNG G/cRK8z4Nv0rhEzUVNUeZVN59LmSQpXDBr/t4yw6CwB9xPYbe3cDip2xE2s4SzWqXl XzCqb1jsqwBlP9LKjhcLltSQ9zM1DoqttenCly2XmJF7+VY74MQqm0zvFhiDG/M4oh ucUsBxIyGI5EG441otrKgwAbAnaWbzSUTJmWv0IkF6g9vZAXay0HXsJG7QLzDsApoP wc2esxdrzTu/jVwoklohDToPfaiKFilWTbMZ3DJgTmqW326ijFiy4UhSOwsYYsvR0j AFLo4q5BNHDlw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 657E05C0439; Thu, 10 Feb 2022 11:14:04 -0800 (PST) Date: Thu, 10 Feb 2022 11:14:04 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Namhyung Kim , 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 Subject: Re: [RFC 00/12] locking: Separate lock tracepoints from lockdep/lock_stat (v1) Message-ID: <20220210191404.GM4285@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org 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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Thu, Feb 10, 2022 at 10:13:53AM +0100, Peter Zijlstra wrote: > 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. Another option is to keep any additional storage in a separate data structure keyed off of lock address, lockdep class, or whatever. Whether or not this is a -good- option, well, who knows? ;-) Thanx, Paul