From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by sourceware.org (Postfix) with ESMTPS id 3E3163858C56; Thu, 7 Dec 2023 05:18:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3E3163858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3E3163858C56 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=192.198.163.9 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701926312; cv=pass; b=gQupPo42czxanGKjRcwdcm8HzrXxDtWgARp+WsBmUMYYJekW4LXlyiPbUlNEkYgEFYbuSagMdW4K2Gwj5sIdDraqF6Thit6sICRhEJ+7UXd4xgD1jbLrmkWZ0VdjpD6Ftxard4E6EJwsfKWUuOqPCskjQSz4YDWqwcxX5dpE2Zc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701926312; c=relaxed/simple; bh=IyJJIAvkOU0CzYzfKIv0TtN/wjck02mEB9gtTHRqj0Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=igtQ8JYQlECWhygeCqNFNoRFjSL8jZiJRMXy3r/UnDUAo0aSPBnS9fUsphEfQWHaZsEAEavfGqwXiSpqCHCtErdXCGqvNkDBG/w/2CxX1xpeW5QmLIxNnPefDut0WUMxgMumboCEhTmbbRLt5Aoz9GZbB6YwvDY3jPnVj7Cog4E= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701926302; x=1733462302; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=IyJJIAvkOU0CzYzfKIv0TtN/wjck02mEB9gtTHRqj0Y=; b=TM11f86zSQVVY7h+XAiKr7PUUUI84avx2MppsWlXw4hZePUeClrdaRbO hGQ+iaD3eC9d03IxmNEYYKNSP4cIbb78yixDGbXS++hX7A/KW+ixbtm48 9A3NenkkdJFtAVkDCuwzV7o3Pcz2IhwH6JAN01alT2+o35oQ1aJ0MsJfj SBmYfN7UPt1HnTJgqVNE9Bqma98oZmIBgPoV0EKBq8lgJkgjZoIAF1RRd ZTNFMqxeh8sVmj5XO3D7QVsUY8y4h6LhIX6FouChBTBILsCngs+zA9QX5 Z2Est3nOtV3GgoP+jn1vZ7uS+p17hWm/KGSJwzPFh8zs28WK/B9rkyHaN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="1056104" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="1056104" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 21:18:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="862352455" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="862352455" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Dec 2023 21:18:21 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Dec 2023 21:18:20 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 6 Dec 2023 21:18:20 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 6 Dec 2023 21:18:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iqBNuEwN4eBDA0Sq7wBMqCOB3Wtz6Vsj89cHod8LnvSyy5cOIcSIE62YrCcTyqhfxxcd/KP/3ZJo/3auT01z+KvAMPIPJhamzL8SyacoI5V/moVXt7WhVnqkbcN3iuuXjnWUuDE/BpvCApBZUBjILVMwKnzylrVaVOafbTpMsPOnPlK2hCNjvxcoz2znfMJnSo4jHxnYHdLSaIx9p6UVWr1Y6zozWt2EsYS6n39KhxO6bncYLz6LILw91R6O2/rS5IJc21/95R4eKs8Kzn2RwG8BCoH+MMR8OOZpCfIe2NWsDc2SPQJYKGsIZ59uMioXqvUIG5/EJACO7rLFqzuuGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0B2wKdbEj3xn5JC3UzycOgINIs8rdT42FiIajZrn1TY=; b=dM44xbmEhIhnGt9foQ9weq9CaU0ADfFCWauKIsL8gyveJ807cXgcRt7pnrox1hh/kGjdc6UUaOFTtnsRlSutIL4vVZox4rdWTlgZipCzSpW+K0GjN2pNVpB6V/fz1z2kflRweAj/aAQn8A8WDFDDQs8DuNkJW2Qvnd28Xrzfgc9SyJmXJw9s6DiuB1jZRTTMHJ9otHFONsdS4Z1aR4LmiHC5RW9QWPqEkhUFVHZufoxIRgCVxeZBV3LAE+IbUI5++gpo7shSx8Gijfo+h6bTRjyBcRmbvCr9o64BbsCaN3FW3WKZup+KwIEMqbLOCkUQUm8xXK6XOwD1gFEN+ahdkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB6056.namprd11.prod.outlook.com (2603:10b6:510:1d4::20) by SA1PR11MB6783.namprd11.prod.outlook.com (2603:10b6:806:25f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Thu, 7 Dec 2023 05:18:18 +0000 Received: from PH7PR11MB6056.namprd11.prod.outlook.com ([fe80::a74b:825d:7dc3:67]) by PH7PR11MB6056.namprd11.prod.outlook.com ([fe80::a74b:825d:7dc3:67%3]) with mapi id 15.20.7046.034; Thu, 7 Dec 2023 05:18:18 +0000 From: "Zhu, Lipeng" To: Jakub Jelinek , "ian@airs.com" , "Bernhard Reutner-Fischer" CC: Thomas Koenig , "fortran@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" , "Lu, Hongjiu" , "Li, Tianyou" , "Deng, Pan" , "Guo, Wangyang" Subject: RE: [PATCH v4] libgfortran: Replace mutex with rwlock Thread-Topic: [PATCH v4] libgfortran: Replace mutex with rwlock Thread-Index: AQHZjnSfaJBwUZwj3E+ssbm/v3Oko6/v5JkQgCrGN9CAPNP9MIAATqAAgAA2rOCADjZf4IABjvaAgCD3iVCAFbkLYA== Date: Thu, 7 Dec 2023 05:18:17 +0000 Message-ID: References: <81c359ae-ab69-7f03-f113-4b865441de44@intel.com> <9e30db8a-2a6f-89d0-84fb-2f549f61954c@intel.com> <93b9e2d5-4355-136a-a961-da1ae9c1468f@netcologne.de> <20231102105847.2b48a607@nbbrfq.loc> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB6056:EE_|SA1PR11MB6783:EE_ x-ms-office365-filtering-correlation-id: d25c30d2-19f2-4f0c-3620-08dbf6e3ebfa x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T49GV4X2NBgVbaSxn6hETI5WbxcWIMIe1cuRnC0fLmRp7fGcLZyfRXKphe+eovQk0X5+GgdRK3IUrhHrl+L2E/bqbMsuL7/++qEgBibHx5PjrPMPPV6mJ1kSff5UIXnVma9O386tKmuvUTDwMcfoNNbWjnb7sPU7Fs4Y9mumFpAqqD7+giGRzWLSjakO602zO0KxSCHQP/OnHB+cFSE3VXk5RYlkTk9QH98nxVAC8uY3cNpzNThY2LLeas9JbOxkYYFn5vSZ4jFsjq3JSySchoLKrOQAmIXhVfzLJErsX+40542CGCx1Pz7achG1/Zg0T9LnFOvS9znjvPEjvqmrzkM7KRJ59hT/AUobxKS2DIVdqq18nKG1GFJNTDL1FmwWfFJExEG4VRvRtxoKACq/H+uhk9OgOcC/DlLkYC7QIiTzog6jBbICap63NI/H21SusdYmnOI9CQhBDfxvHbzZgRnlkYJohWxTxXi/MoToWrQ+6Sw2RgcAIMJH/oIV1pxzgDubf/5d67tyAXav1YC6cZGgp86Vs2a8GvUHPTFpxvdo5VDIOL8DjZs5oOdmreonFYeKOTXelbrf0lI3sc0WepAH+3P+3Yirr6DoukuNOyY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB6056.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(136003)(346002)(376002)(366004)(84040400005)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(4326008)(2906002)(33656002)(8676002)(8936002)(52536014)(86362001)(5660300002)(38070700009)(41300700001)(55016003)(83380400001)(82960400001)(9686003)(71200400001)(6506007)(7696005)(107886003)(26005)(38100700002)(122000001)(110136005)(66556008)(66476007)(66446008)(64756008)(54906003)(316002)(76116006)(66946007)(478600001)(966005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?48TObMutonvU8VAi4nwxQjZueJYkkHtAg0zQdZlERUEk7egjUA/syprh3U4N?= =?us-ascii?Q?Kpr+Pdlq/U/gxdQaDVIxDbjlOC0rCt87n0XGIMXogx8dDoLF03ZNjXktvKr4?= =?us-ascii?Q?HIJYHR5SDrisDuMzWMMBf6dFIHQcU2YsFDDhZa+egI9x1ewNQDR2+Ejc9ZBO?= =?us-ascii?Q?ySgPykiLYDApfLdyUeNYmmDkkCHDmvsWhPoRs37Dsq+9kT6tR7KAq2jpxDOg?= =?us-ascii?Q?+K5/wrZWFoxPh38TKqjfpBoyZuD1TdvuKNfbwyahw5V7DEgJBOr5oCEdA+24?= =?us-ascii?Q?AfOaim8SO54z2ZM65Jcyw32Zzs7gZNDcy5SElIsqVZwDhNs44yk4IZPpFY+w?= =?us-ascii?Q?3JBHTLuyzaS0voMCoLUcVWMnhaNgi1OF1Ttla7lmpRnaSoIYrMuUgTrCU8D5?= =?us-ascii?Q?ZvMc+YGMBELUrtBFNc5jiHGb+nNJtbOx5ghGFYt8Xk0B9hILIWfAVJ+R7lDy?= =?us-ascii?Q?1MwGC740tUVeb+vvL5vNlu5bwSaSBz+m8k+U0CXoFJJCM+z6edWMQUZ7ZJcW?= =?us-ascii?Q?tNFMF0lqnTz95JOYLmHsMlIcCAso5zTg/6Ct1nq1zw0bqAQChy3mCTomXkMN?= =?us-ascii?Q?XhgQSlOcpNeErGpgShCfEvpzIcxlDkcKJsjlXNa/OLQFUNZ8+0Nqwnot3RzV?= =?us-ascii?Q?oP5xDC9gHjvQUJRw+RC7szJl1zjocnCBRs2d+m8ftrOJPAfOlrx2nSnkzuwz?= =?us-ascii?Q?8sPjB2YmA3rVV6Skxs3KUVrclzyRCV4Vd4zkxcaRiXqm2VrqtKkb4Y5wsb+S?= =?us-ascii?Q?wsLF/Dgf3BN4m4Xr4kSN0/JnDR0T04Fq2Lrdv4lQH/hOwB03bRSZNuH+14cp?= =?us-ascii?Q?+D1+56oY4Fcl/XjmPghuHUDfHUCTTuqL/bP8ME2XzltGlbftEAgLDedYh1Cb?= =?us-ascii?Q?Xqa0mZpNLx0VTz0mCDNeVO1LeYiu0/A+L64mPc7Sjhl7e/4xxpqhoLdsi4dt?= =?us-ascii?Q?V5xnWFB2R50zwh4qjQyWce1ndUVEgXCQtX1ePa95doNDwVRExXegkhvbuO58?= =?us-ascii?Q?Id8AQy/XqQIkr2HYC0MIPU2itO9fwCdgtEQxQQ+SW9sx34iuyzneDqNhmz4B?= =?us-ascii?Q?jeTYeOXIbxONKBV1RUg6m+gpTbyOVFlBH9OaVkfHEpO0Ro4X4spQ9/k2EciF?= =?us-ascii?Q?YvqpZwcPnRnrok4J21WmufbsHahVhZjCTN8kC7FmswNMVRG5dUWwnflfxl7M?= =?us-ascii?Q?FS6wVi80tKtreKNR6wEPy9ZFU2UF2FDAtlO18gbEzweThH0qeE6KN4siLK/a?= =?us-ascii?Q?tIawbILdixDiJcFEpsnbDwhYqfJbYlp0VwIcTc1olXEiN3T+YwdkRgiCm0ns?= =?us-ascii?Q?IOe1Zp806Gz/w69fxUdzlhMpPf8KdMvXyCSLz/3AuGjVUFk6frkBMyys5LnC?= =?us-ascii?Q?xFAPcAggemXb9GVBs0NyxXFpK20niYoi/IEokvEjkf5b0ofGi1TjnOFpWLOw?= =?us-ascii?Q?p4rdqF4qIBHm44eQtQfh4S0aPGdNVmqi/mAn4DRNIwGoFmLLIOSt55vUDYNO?= =?us-ascii?Q?UC3hCIA1l0H8/E6V/XaXYV7z7rDgd8T/kT2TLwuAEzP1woqtqkOiBE5qgs/C?= =?us-ascii?Q?eXWV2lGfn09LyeZMLgFOtQ/xRezXJoCgkkBe5za+?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6056.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d25c30d2-19f2-4f0c-3620-08dbf6e3ebfa X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2023 05:18:17.9745 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QYtRK92YWBrgrSq9yp/cs0N+CMtmM4sLt9MJQt+Jt/y/Xjew1MEKaKFHCTj2FyxGrbrIyxbeJYru+HCasqEsGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6783 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP,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 server2.sourceware.org List-Id: > > [CCing Ian as libgcc maintainer] > > > > On Wed, 1 Nov 2023 10:14:37 +0000 > > "Zhu, Lipeng" wrote: > > > > > > > > > > > > Hi Lipeng, > > > > > > > > > > >>> Sure, as your comments, in the patch V6, I added 3 test > > > > > >>> cases with OpenMP to test different cases in concurrency > respectively: > > > > > >>> 1. find and create unit very frequently to stress read lock > > > > > >>> and write > > lock. > > > > > >>> 2. only access the unit which exist in cache to stress read l= ock. > > > > > >>> 3. access the same unit in concurrency. > > > > > >>> For the third test case, it also help to find a bug: When > > > > > >>> unit can't be found in cache nor unit list in read phase, > > > > > >>> then threads will try to acquire write lock to insert the > > > > > >>> same unit, this will cause duplicate key > > > > > >> error. > > > > > >>> To fix this bug, I get the unit from unit list once again > > > > > >>> before insert in write > > > > > >> lock. > > > > > >>> More details you can refer the patch v6. > > > > > >>> > > > > > >> > > > > > >> Could you help to review this update? I really appreciate > > > > > >> your > > assistance. > > > > > >> > > > > > > > > > > > Could you help to review this update? Any concern will be > > appreciated. > > > > > > > > > > Fortran parts are OK (I think I wrote that already), we need > > > > > somebody for the non-Fortran parts. > > > > > > > > > Hi Thomas, > > > > > > > > Thanks for your response. Very appreciate for your patience and hel= p. > > > > > > > > > Jakub, could you maybe take a look? > > > > > > > > > > Best regards > > > > > > > > > > Thomas > > > > > > > > Hi Jakub, > > > > > > > > Can you help to take a look at the change for libgcc part that > > > > added several rwlock macros in libgcc/gthr-posix.h? > > > > > > > > > > Hi Jakub, > > > > > > Could you help to review this, any comment will be greatly appreciate= d. > > > > Latest version is at > > https://inbox.sourceware.org/gcc-patches/20230818031818.2161842-1- > > lipeng.zhu@intel.com/ > > > Thanks Bernhard. >=20 > Hi Ian, > Could you help to review the changes for libgcc part? > Very looking forward to your help. >=20 > > > > > > > Best Regards, > > > > Lipeng Zhu > > > Hi Jakub,=20 Could you help to review this patch for the changes in libgcc/gthr-posix.h. Just as Thomas commented: "Fortran parts are OK". We need your=20 comments for the non-fortran parts. Very appreciated for your help. Latest version is at https://inbox.sourceware.org/gcc-patches/2023081803181= 8.2161842-1-lipeng.zhu@intel.com/ Lipeng Zhu, Best Regards.