Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3513083rdh; Mon, 27 Nov 2023 16:48:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqgNR4pb57xfJr46iX/jrLBkbTsBT+ZRzC1XSw6yCQ/sobWk6/Ck1KCMTsqoaJLNj1VnKA X-Received: by 2002:a05:6a21:19a:b0:18c:ab4:f6c9 with SMTP id le26-20020a056a21019a00b0018c0ab4f6c9mr13970063pzb.56.1701132502795; Mon, 27 Nov 2023 16:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701132502; cv=none; d=google.com; s=arc-20160816; b=y7JnziJChLo84VAbXNpfU311ynKJRNCnOAZiDcFNdCGbnbJ1T/Sbzl/B0Ac3VLR/uZ iRxDTIcPbdnh0eec70Bmg/PgZDo/OJDZk/pQHN6RR0RFlRIEEI/rEfcX1HUAgtPw6LTM 9VcTDvJALimLz5U6VHUSoVSuk1TtAlLu2F44wZ/6SBOi42v+l5WeNgD9/4vLGxDxrRX+ nG+M3Bx+7OnUFJRgl4EhRaQrhI8sEOgRgJmv3LV7jHaT+QtHLA9DzHMFo+Hh4wR4TE51 LieOk96l9GgMtYCgOAe8DmD3X7kXu5QbSpimrRPtMsg7m4anGPv/1APDWYHxtRa1SEd0 sTLg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DtgaxinLXSCCQE6o9mgd8XEBVA5Bsvy32Rdg13qf8x0=; fh=deFgf0HhlwuJynf35xRhPfAZp7J2y4NZEmhahrx00h4=; b=ky5c2Q6MVMrNCd3NexD0NMyI/HgUBfkGVTAniiVjMQ3NMZU/afggaWh1groZGIH1ia 1eTRrUxjeMip/1u1VNg+XvW90BUZFQRXJaGnGxUZSKfcL+BN5B7LZsZD5Mj/uEHVSDRh /TTg2TlyNssK2N33OaXLqbeqisHs0ylJs4CU5TB7MMB90wdIM+PLZuvqNo46R0DBhw+w ty2BGdK0SjDbXcaOdWlLFd+oXhO80DWZjL44x15M4rZyb3/iSL4DBfbIpu4LoOYJ1QWi aC0yYsfl1kIQdFrBp9mOGx4ngYY0KTnyyZhtEGO1MIm+nIGrtHfCtwxf2iNRYS1zuqCl zhMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBtQ9xbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id ck21-20020a056a02091500b005b11e5a69fdsi11683028pgb.508.2023.11.27.16.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 16:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBtQ9xbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 484C9824776B; Mon, 27 Nov 2023 16:48:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234309AbjK1Ar7 (ORCPT + 99 others); Mon, 27 Nov 2023 19:47:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231378AbjK1Ar6 (ORCPT ); Mon, 27 Nov 2023 19:47:58 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F341AA for ; Mon, 27 Nov 2023 16:48:04 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61A4FC433C8; Tue, 28 Nov 2023 00:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701132484; bh=rWkxJ6IcyviVAp9PF8CpLDKPseHgpWh9B3/hZ3BcgVo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mBtQ9xbg4WqeloNr38BAuZF/FrWncf/3bkKiVz61Lcf3INQgqpn8l0gHrphNVcnS1 FqLq7/UgqIJCB2LtKqdzjSpHYFsTIr+uaRmFYXscaW/2Su1kRNeUux6naUuWNiT1N3 7SyHKRKgwv48E4qM0JGOWzdg+jwpXRMHvhsoA48Sq1E6Xc8HmPe9roJZ65f9JDdPS6 9pOaXFZ3plP+E6OBW+irLzNzaIdUn9MtHBiuY0bY+DVvh4Q8ci2yOiUYriQ3Pjk/yb VY0lslPMvHCcIx3uYPaJ1aElh/1ark1fBThHAdFffZej7rfBSvrlU8ZQH9vMkyYOuw 6IKs1LrhVB6Pg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id BF97540094; Mon, 27 Nov 2023 21:48:01 -0300 (-03) Date: Mon, 27 Nov 2023 21:48:01 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers , Namhyung Kim Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Kajol Jain , Athira Rajeev , Huacai Chen , Masami Hiramatsu , Vincent Whitchurch , "Steinar H. Gunderson" , Liam Howlett , Miguel Ojeda , Colin Ian King , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , Ming Wang , James Clark , K Prateek Nayak , Sean Christopherson , Leo Yan , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Li Dong , Sandipan Das , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v4 01/53] perf comm: Use regular mutex Message-ID: References: <20231102175735.2272696-1-irogers@google.com> <20231102175735.2272696-2-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 16:48:20 -0800 (PST) Em Mon, Nov 27, 2023 at 06:53:19PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Sun, Nov 05, 2023 at 09:31:47AM -0800, Namhyung Kim escreveu: > > Hi Ian, > > > > On Thu, Nov 2, 2023 at 10:58 AM Ian Rogers wrote: > > > > > > The rwsem is only after used for writing so switch to a mutex that has > > > better error checking. > > > > Hmm.. ok. It doesn't make sense to use rwsem without readers. > > Well, the only reader is a findnew method, that will primarily read, > but possibly write if it doesn't find it there, so converting to a > regular mutex seems sensible. To be fixed tomorrow: 3 32.71 alpine:3.15 : FAIL gcc version 10.3.1 20211027 (Alpine 10.3.1_git20211027) util/comm.c:20:46: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) 20 | static struct mutex comm_str_lock = {.lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 4 32.17 alpine:3.16 : FAIL gcc version 11.2.1 20220219 (Alpine 11.2.1_git20220219) util/comm.c:20:46: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) 20 | static struct mutex comm_str_lock = {.lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 5 25.82 alpine:3.17 : FAIL gcc version 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) util/comm.c:20:46: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) 20 | static struct mutex comm_str_lock = {.lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 6 26.64 alpine:3.18 : FAIL gcc version 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10) util/comm.c:20:46: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) 20 | static struct mutex comm_str_lock = {.lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 7 29.66 alpine:edge : FAIL gcc version 13.1.1 20230722 (Alpine 13.1.1_git20230722) util/comm.c:20:46: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) 20 | static struct mutex comm_str_lock = {.lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 I.e. doesn't play well with musl libc. - Arnaldo