From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED467C7EE2A for ; Mon, 8 May 2023 08:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233278AbjEHIYZ (ORCPT ); Mon, 8 May 2023 04:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233678AbjEHIYI (ORCPT ); Mon, 8 May 2023 04:24:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0AC1A10A; Mon, 8 May 2023 01:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=ypZSIxmdSA8iF2yRhvmEJb0SvA/i+Bsfp62do6qBrxw=; b=VPvIQNx+z5YLvzawxyYzGAQtCH 2J9yjl/4Q4nWJ96EMrzB9/QoWY8RUjsHEcym+xZTmnSdQa/KybMMAjA/E5U/VlNinuQEpdJwVkY7e hXnYIQY+GxO8M8DYU6qdSOqoI5Yp0fYM1xwBpucfIe6OlfMHJqMA3l5SJRb7+4J3wEJiPBUTKXfia uRfTb9tcX+IpH7QOoy2ntWpmZwUYGi0V+ux5fNUaSPY2TXDpsoYKEa3WRlBCzr/dEDIp9ztLb2kxo S6w6b7wvubdW7Vbe/YRGdxXLUl4CShF6k1w237T9BycZXcodfLTCQeR7rZD5qUhBP8CXx+EPvqBZd 8czoxKJg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pvwA1-00DyCr-O1; Mon, 08 May 2023 08:23:58 +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 C08D030026A; Mon, 8 May 2023 10:23:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9E74D23937D84; Mon, 8 May 2023 10:23:56 +0200 (CEST) Date: Mon, 8 May 2023 10:23:56 +0200 From: Peter Zijlstra To: John Stultz Cc: LKML , Minchan Kim , Tim Murray , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v3] locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers Message-ID: <20230508082356.GS83892@hirez.programming.kicks-ass.net> References: <20230503023351.2832796-1-jstultz@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230503023351.2832796-1-jstultz@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 03, 2023 at 02:33:51AM +0000, John Stultz wrote: > Apparently despite it being marked inline, the compiler > may not inline __down_read_common() which makes it difficult > to identify the cause of lock contention, as the blocked > function in traceevents will always be listed as > __down_read_common(). > > So this patch adds __always_inline annotation to the common > function (as well as the inlined helper callers) to force it to > be inlined so the blocking function will be listed (via Wchan) > in traceevents. > > Cc: Minchan Kim > Cc: Tim Murray > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Will Deacon > Cc: Waiman Long > Cc: Boqun Feng > Cc: kernel-team@android.com > Cc: stable@vger.kernel.org > Fixes: c995e638ccbb ("locking/rwsem: Fold __down_{read,write}*()") > Reviewed-by: Waiman Long > Reported-by: Tim Murray > Signed-off-by: John Stultz Thanks!