Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3514837pxb; Fri, 11 Feb 2022 01:20:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw11yqd0HeeotHc708aHgTXMK4m31Jkk6mYmKLMzaPFGZTShaQeDDSjD0pvhwGxG3/XPYZ/ X-Received: by 2002:a17:906:7812:: with SMTP id u18mr579946ejm.335.1644571205024; Fri, 11 Feb 2022 01:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644571205; cv=none; d=google.com; s=arc-20160816; b=Q6ojlExq/Bg+fiiRFiOJ6oFg1PBuEFcTkcW/0O66qRGnRPTbtBJIIn15Z3S+G4tCtb S6sFiinjsJwSsvaX+Sr88/4SzeoEV5fMs+YEWx68iimPfXAqST2ZFYX2+XY+wYaCCxpY 1+cZFTvf9onpJHeozHubN50bFQaz0TKYVB6LaXOarzR7o7kVb5a0huhVe93My7OPA5tq 7uPF5B9IuodYoQqbh/n77MeFkas2ElBlqHd8B5FNBMBXLgyXCYww40yiE1CaRlsdllyT cdShGMoRoehnLJgxuyZqg0aN4lPASMU79w6RX6dMKEB+fbcjep3rZafE3T3geX7eWgnE PstQ== 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=nC1KApq7e2Tv1mRrJaVJbGFX4EPFBr5Wq82MxBaNzD0=; b=wAoyu8+yCLeZGPryxupGjX7E2ciEJN8HklWTl+tZsxZxIos3Feduam+ZjCjie+qgHg 6qTLM/1FGwA7Ou9sL72CZzFa2HiDuRiNcuKEOg9RKlUSFqL2iVV9DVd/4k81RSnVK6ip NpkVlKd96O4/bXTkIhEfBW4lEvssdBI/SMmY7XG+V7GqcewjU21FEmhxkK0vpyJentwP iPGxb/Yy3J81MJD8N4BQM9l4BAa7An0V/vPAhJU4akkEshAONUs+jGxO8OngUYXjp+kN +l35KustKyD0YHWXz/0SHa2oGD9+3QHMw2eEzqdzyEgtbhMrEAWW35E00L9j37aLsnDq 9zww== 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 sc17si17302270ejc.221.2022.02.11.01.19.39; Fri, 11 Feb 2022 01:20:05 -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 S237166AbiBKFzm (ORCPT + 99 others); Fri, 11 Feb 2022 00:55:42 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiBKFzl (ORCPT ); Fri, 11 Feb 2022 00:55:41 -0500 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7577102F; Thu, 10 Feb 2022 21:55:40 -0800 (PST) Received: by mail-lj1-f175.google.com with SMTP id o17so11143142ljp.1; Thu, 10 Feb 2022 21:55:40 -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=nC1KApq7e2Tv1mRrJaVJbGFX4EPFBr5Wq82MxBaNzD0=; b=7kLiSQdB+67poBRL/OG48goLLOYPRN4hM0qliz9Rq72HKkp3z1sBsES/sKySUdj0DJ /shIxVGD3VlnCzaPHwaN+9ToowVByp9Xu/KaGXIvJWS7XtOkjti8OSh4ajo8Sr6EIUg8 6iF5o0H/JOlSffKiLmqeGw8TGCCngN+4ElqiE7zQPqtcWSpnHi/ll9Q6U6DlMAE4OY9J 2zCy2k2IMReMHZMZ9kIqOinhR7V/1uvyqaKfIxOnKB4d726JLn81tJqaXOU8vbfmFfxy NvdfH+ENthTDdZzwEweChOjZH8Fexp2Ubxih2CimR4VfSlXUwKFVaPGVSU+dqViCQmqb qbGw== X-Gm-Message-State: AOAM530Buvtn9WtnBpPB6BZ0tfZBhLZnTA8pWBimqxv/zhm8kbkusLYw 3qMXJ5pgg2j+QHltNe7lygHhqgI8h9u2b08wPBc= X-Received: by 2002:a05:651c:a04:: with SMTP id k4mr74921ljq.180.1644558938779; Thu, 10 Feb 2022 21:55:38 -0800 (PST) MIME-Version: 1.0 References: <20220208184208.79303-1-namhyung@kernel.org> <20220209090908.GK23216@worktop.programming.kicks-ass.net> In-Reply-To: From: Namhyung Kim Date: Thu, 10 Feb 2022 21:55:27 -0800 Message-ID: Subject: Re: [RFC 00/12] locking: Separate lock tracepoints from lockdep/lock_stat (v1) To: Peter Zijlstra 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" 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 On Thu, Feb 10, 2022 at 1:14 AM 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. Ok, I'll go in this direction then. So you are ok with adding two new tracepoints, even if they are similar to what we already have in lockdep/lock_stat, right? Thanks, Namhyung