Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3904642pxb; Fri, 11 Feb 2022 10:16:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+nUDxtjFuhmXIYlgeIssvNqfaE1uuxv4bQWrltMkzvz2Xc/pEIIRjQx6ZHgn+NEe6zf7v X-Received: by 2002:a17:90b:2281:: with SMTP id kx1mr1647818pjb.37.1644603387126; Fri, 11 Feb 2022 10:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644603387; cv=none; d=google.com; s=arc-20160816; b=R3W9CDVOM7m3pHZcc8XiAXs2SSgHPAf82qiHrCWt+pqefuZhni3gaVpOq3fzkZ+gig DjpguH1wWWVfyEcdajpBLUOBd1gp0btBuDxpfhE0t7M/0/r/yCu4X5Jfeb44sTVQMkWj 1ttXdoZgmDHwV/pg6ZzruLVIlrCgCom3gmNIjqm/h9kWaYxBinknzmQJBCcHgjrzD+w6 gDNRGZWo9FBzbr7m3tBiF2h2tWK9NqsLI17tO8tEPqknl4MVzQ97fEfne7tCj1sEwNKh XzTyvTA7tpI8FYSnmDVRjf28JOKI0WrIyWf1w9LaMbx904O3CYxVpEbo3hl1hgmZINrv +HtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=YHj2jwcJGwmoQOFICOnj7VYD0ZfKr1aHs76v7p1GNas=; b=jCSlk2Qtnok/N1IBzE6japTry/NkTxF6qRENbFgG9owU5RlBTS0bc4gdCo59DHiDyh loD3ao4hGs6qYau1DRQVJN0kpI53mh0NbGWsI+M+8/ND2udnYfIAg2SnQkRg3xL0+T3C iveNT5xIux5dXIHutf55ukPAc/rSnN9F3fqRHR1VbD7cRzd1NxR8vVolKuCXDeZ+l8+y H23jeFtRQsR2RxEbFZYhu7rMETXp+jZ9wZ1BLhY1T3+2VFmQ0fW6mmuNUpxVwz15NJli baCFOiq73U2C9K+VaunRsjcInoaYoD/srANfcRrL/T0qG+0WDz5kl4vmz7b7IkR6BwTv /G6Q== ARC-Authentication-Results: i=1; mx.google.com; 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 g7si5578001pgc.478.2022.02.11.10.16.12; Fri, 11 Feb 2022 10:16:27 -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; 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 S237193AbiBKF56 (ORCPT + 99 others); Fri, 11 Feb 2022 00:57:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiBKF55 (ORCPT ); Fri, 11 Feb 2022 00:57:57 -0500 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2FBBB98; Thu, 10 Feb 2022 21:57:56 -0800 (PST) Received: by mail-lf1-f50.google.com with SMTP id i34so14570177lfv.2; Thu, 10 Feb 2022 21:57:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YHj2jwcJGwmoQOFICOnj7VYD0ZfKr1aHs76v7p1GNas=; b=uwhFFmZaoJ0Cr/wimNIHZZ6x4a/+thc3/aS8+HS65kdqj1dm1UHjNKzHcxEQAuTk0z phMs+5h3zEdSmiuDODWMVs2PIaEgINGUz1lsxLjf3qd56szk8QAUu9oMCTJD5yogmJhM jF77iSL6eB+659tby+T2+CKs3EZ2iH1iTMQ0pAoaKUsdiKnG1WN6Z6CRaJwLE0LPKIAS rEINvMt2KQAlNLorAaTv4JVBIAGjGksB+vZ3jk2yr3sHlujQjBm2f5sspgdjakqd4inv AD+4pRRB1WvR6AKuT8QpapzOJZft6MiAF4ChmUR06WNHPtRei8coh5IGxO3aZgflOOgS jbYQ== X-Gm-Message-State: AOAM531bK8J1RQZyOuJcdBKg5JKSd7LKo1TuF+K/FSjRIrI5UhabkRJh esU+YmVcImVZVtk+mSQhqh7azqW7cd+tx9qx6IAZ8WSa X-Received: by 2002:a05:6512:3186:: with SMTP id i6mr131920lfe.47.1644559074965; Thu, 10 Feb 2022 21:57:54 -0800 (PST) MIME-Version: 1.0 References: <20220208184208.79303-1-namhyung@kernel.org> <20220209090908.GK23216@worktop.programming.kicks-ass.net> <20220210191404.GM4285@paulmck-ThinkPad-P17-Gen-1> <52de2e14-33d9-bdda-4b37-3e72ae9954c7@redhat.com> <20220210201058.GP4285@paulmck-ThinkPad-P17-Gen-1> In-Reply-To: <20220210201058.GP4285@paulmck-ThinkPad-P17-Gen-1> From: Namhyung Kim Date: Thu, 10 Feb 2022 21:57:43 -0800 Message-ID: Subject: Re: [RFC 00/12] locking: Separate lock tracepoints from lockdep/lock_stat (v1) To: "Paul E. McKenney" Cc: Waiman Long , Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , LKML , Thomas Gleixner , Steven Rostedt , Byungchul Park , Mathieu Desnoyers , Radoslaw Burny , Tejun Heo , rcu , cgroups , linux-btrfs , intel-gfx Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Paul, On Thu, Feb 10, 2022 at 12:10 PM Paul E. McKenney wrote: > > On Thu, Feb 10, 2022 at 02:27:11PM -0500, Waiman Long wrote: > > On 2/10/22 14:14, Paul E. McKenney wrote: > > > 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? ;-) > > > > I have suggested that too. Unfortunately, I was replying to an email with > > your wrong email address. So you might not have received it. > > Plus I was too lazy to go look at lore. ;-) Sorry for the noise about the email address in the first place. It has been so long since the last time I sent you a patch.. Thanks, Namhyung