Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3837142rwe; Mon, 17 Apr 2023 04:26:21 -0700 (PDT) X-Google-Smtp-Source: AKy350aRSEyundyEoYF0QiTLk7YeWfWJ5oYwzs9ft1N4cIbWLooFxbN6IgGDGNfM9N+U8zKn1AJ9 X-Received: by 2002:a05:6a20:3d8c:b0:ee:bac2:c6e1 with SMTP id s12-20020a056a203d8c00b000eebac2c6e1mr10686563pzi.23.1681730781428; Mon, 17 Apr 2023 04:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681730781; cv=none; d=google.com; s=arc-20160816; b=SIqHCAy4PFgtORKthQVpdnSKmX79E31ILptXgfQae2agodSbB5UwfeQcLg5w8VGX8L l/8XryC5I/+GJj5P6Z7ts5FzYu0C5uBIkOo7LMTiFFYVU3RvkFGPRj6vmndwByiUcBfG P5HQNIlvmplbvtErFuOeuKWuTC1raAcuM3Iz6TM0nYE8QQWdehJIYfNFCxQT8LbdRgKK RStQC56bDbp/+KIxH37obJkvwO4AN3zx3VarJxLIQN0O1zs3rKGePi6WP++NS7pH8KiV NgxsEti40yEl+irv+rLYRx5TdFSQhDKJ6w0ZvL7qfNtvxd5j/9lsp9CEXCHNp9JXb+MW I6tw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=GgEqcuO3bbvAsK7wAkwmlSOx0DBqrerOevI4PeRVwUY=; b=oWnHdl1+EmY9nZG9cyUxeP1mjquye2IPOTZkpjSNaeMdyhDTXNznOhsmqcSSkpLVgx LQ5UwqaJ9RSeLPQDnp0kn5o3GNEgojzli+uhUIbu517puvz2vGsULjRg3viRh6DmOCf4 AHm0wtMZYXFSnWVKF0sija8LGcylxu6/72AozOp4DW4xSyEiwTH5JjcLtEBDbvvm5wmq jLIrWwI7zYd9YwMC4/zujzoTPA9Fe1H8OwTR0ewKqj1urVtuCZfqYFXrp5qVV57AKcIQ GyVDgh/0y4HJRo78p1pUb851tLqd1Qf40zvoTxt7LvEM8vebfxbGf193bh5JUG8payuD Q2ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JbKPCR55; 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 a32-20020a631a20000000b0051b554df1c2si10535189pga.497.2023.04.17.04.26.08; Mon, 17 Apr 2023 04:26:21 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JbKPCR55; 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 S230300AbjDQLWo (ORCPT + 99 others); Mon, 17 Apr 2023 07:22:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjDQLWm (ORCPT ); Mon, 17 Apr 2023 07:22:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F986135; Mon, 17 Apr 2023 04:21:59 -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=GgEqcuO3bbvAsK7wAkwmlSOx0DBqrerOevI4PeRVwUY=; b=JbKPCR55W8FRNyQwTjDNOYTFMP NhkgQR8f0KlF4XiO4AnQCAtsntHHCrzvt8nuHC76oWWaO059gRqanmeTfqiD3mQS+sGPHmdX+jgi9 3uWDql5rkAQQz8QSEyXzGFyWenFe0oOS7Wc4LnALvJjSQeUdAszYeHvd3lmFSLLPzdGZ5JdqwNg86 4YP7caJWIrFeeLc3nUqOrDSYZ4kA+0435y6jzNu1r9eZmBNR+Q9qkIV/jrcwJCIhG2hEd8mzy2RKR v5Et+5Ro7qmeps+u0xZm49qQGVFfLgBDIdS6q3XS9fBSznqHU9sRdbLnsqKtu+8QIl+py0f8Ztcv5 PboVCvjw==; 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 1poMti-00BHe6-Cy; Mon, 17 Apr 2023 11:19:50 +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 DD55E3001E5; Mon, 17 Apr 2023 13:19:49 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B95C224248706; Mon, 17 Apr 2023 13:19:49 +0200 (CEST) Date: Mon, 17 Apr 2023 13:19:49 +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 v2] locking/rwsem: Add __always_inline annotation to __down_read_common() Message-ID: <20230417111949.GJ83892@hirez.programming.kicks-ass.net> References: <20230412023839.2869114-1-jstultz@google.com> <20230412035905.3184199-1-jstultz@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230412035905.3184199-1-jstultz@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Wed, Apr 12, 2023 at 03:59:05AM +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 will always be listed as __down_read_common(). > > So this patch adds __always_inline annotation to the > function to force it to be inlines so the calling function > will be listed. I'm a wee bit confused; what are you looking at? Wchan? What is stopping the compiler from now handing you __down_read{,_interruptible,_killable}() instead? Is that fine?