Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1577974pxp; Thu, 17 Mar 2022 11:58:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIHgFEg1cgSXsgRiOOIkXvtp0O3ojshgnfnCWQ1nR1Sco3kRZVTJDijiacu7I5KLFQsanB X-Received: by 2002:a05:6402:510b:b0:416:9d56:20e with SMTP id m11-20020a056402510b00b004169d56020emr5960201edd.264.1647543504196; Thu, 17 Mar 2022 11:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647543504; cv=none; d=google.com; s=arc-20160816; b=CmnxY1U3MVqjtFgxu0xwiwN9u3/H+4Qzh047n4PJEtSe5S3WDStAJxvS+XqZw0UPW7 N4CsOqUPx035gC597X1bSQgOVwyCQLrxbBOfDfLXXHIr6FZPh3DSAwpQYh0ryCELaOGL s6a4+PCR0hdblTIMvVj8Ffanp+eSq+C6BTygotoiJ92Pei/HFxhmdUtWs8LXvP46zRy6 Lz2lLbsKxe9Rha+XLteG29+1CaiSh53O2oaRoRkC2w3Q4cI5SsD+LVHZzX9/TzgJbvUc ISCOoLWYBLp6eEmONBkbxX9bVeOaTaIat9K8NyTLlX/Uh7cRkJv/+ujc1OiS+q8zWbVf LE3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=nnynFr+v+iFhkt1wmvhszCPrx6G4pv4Vwz0msJ0qS7A=; b=ByGKzADorpUS7iHtXrJh9bK10taSfYW54TcNaX1yQH33W1J44ypm6MyFpfzGLA37+S zE9im2h8jqCLD/+XIXEOS7AQ7NOabvL3fTVTHM+F1oEleT8QSYmJa0BLPKmsI7+7SZ92 xSrYUSergb1kmA6ehBKCRAF/l5uiPRtsbljI9khT76E2rQG35lFKDZDCb/olb+dweq+m EJMcl4VLv9d0UggaZp2V/idTfMTBMCrsPX0s/LI7BVgc9KJgm2VPBFG1kJINByA0X33R NrAD1vqoKXKdM1+p519g+BmaqP/U6k+KBfdTDs+8gs5QzExrqLKEEAhV0Ic21tnc12BZ cSIg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 25-20020a508e19000000b00418c2b5be0esi2359932edw.240.2022.03.17.11.57.58; Thu, 17 Mar 2022 11:58:24 -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; 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 S236349AbiCQQMR (ORCPT + 99 others); Thu, 17 Mar 2022 12:12:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbiCQQMQ (ORCPT ); Thu, 17 Mar 2022 12:12:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24AF421415D; Thu, 17 Mar 2022 09:11:00 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id BD51260EED; Thu, 17 Mar 2022 16:10:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C81BC340E9; Thu, 17 Mar 2022 16:10:57 +0000 (UTC) Date: Thu, 17 Mar 2022 12:10:55 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Namhyung Kim , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-kernel , Thomas Gleixner , Byungchul Park , paulmck , Arnd Bergmann , Radoslaw Burny , linux-arch , bpf Subject: Re: [PATCH 2/2] locking: Apply contention tracepoints in the slow path Message-ID: <20220317121055.33812ac1@gandalf.local.home> In-Reply-To: <365529974.156362.1647524728813.JavaMail.zimbra@efficios.com> References: <20220316224548.500123-1-namhyung@kernel.org> <20220316224548.500123-3-namhyung@kernel.org> <365529974.156362.1647524728813.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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, 17 Mar 2022 09:45:28 -0400 (EDT) Mathieu Desnoyers wrote: > > *sem, bool reader) > > schedule(); > > } > > __set_current_state(TASK_RUNNING); > > + trace_contention_end(sem, 0); > > So for the reader-write locks, and percpu rwlocks, the "trace contention end" will always > have ret=0. Likewise for qspinlock, qrwlock, and rtlock. It seems to be a waste of trace > buffer space to always have space for a return value that is always 0. > > Sorry if I missed prior dicussions of that topic, but why introduce this single > "trace contention begin/end" muxer tracepoint with flags rather than per-locking-type > tracepoint ? The per-locking-type tracepoint could be tuned to only have the fields > that are needed for each locking type. per-locking-type tracepoint will also add a bigger footprint. One extra byte is not an issue. This is just the tracepoints. You can still attach your own specific LTTng trace events that ignores the zero parameter, and can multiplex into specific types of trace events on your end. I prefer the current approach as it keeps the tracing footprint down. -- Steve