From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id C64A23858D20; Wed, 13 Dec 2023 20:52:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C64A23858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C64A23858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702500759; cv=none; b=LOEdqo+ggLhphLdYGMVp3o/Ict5o9jyg0pPXUFHFl0zCLfcJPiebZpfx3uSQffti165BptD/T2cIF7VqInwUm0htn9HV540iHgb5u1r9ow+ZALynBXyoyUoIg/hS42u5it0umZLgDErJDoWe8rA4cBvY8qoxmAXbhpTddtTXcSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702500759; c=relaxed/simple; bh=pX4f1iOyD+Y33MIB0q9Vxnza6SeqEFvQSGEyxhn3/9M=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=PAbN81flX2zb3LIRE8QeTssfxD+LAy+bNRUmJRKRu/zQ/ubhH0xvNOjvSfrGU+0KRe1QduOvjcj7K75gsbQn7pkIpDpv3OgpXnxGyb5cLhvib0f6WcqpOtd8GNURDQcz5PZXFby1Jdp4b9pd6bBYM7CUSqFSSlebPN6XDJU6qco= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: 6SMt/L2LTzuh/EBcD93g+Q== X-CSE-MsgGUID: IDlWceriTIa9bO4Fc2T+Eg== X-IronPort-AV: E=Sophos;i="6.04,273,1695715200"; d="scan'208";a="28199731" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 13 Dec 2023 12:52:36 -0800 IronPort-SDR: SBGKs6zgECMEQ2PlpJXpkP2BPPhiOxRz65iRypsjmogCknzgdtJARy/SrQ8ueeSKLejTstt8Bv SnztySnrTdU5j6PdoZ08JQV0BnOZZ0DqOtRzFz8YJ8oDb2bTs9QlijgwQpEyfTc/pQWE7AyhcK YnxSYyHr/iVyF5+UlkZRgAK9Af2ihHyIoMLpykYRKnaqdBrIuiRlJW2j4OyYPGSIz+JJEkm5SV 8l5IEvCqHkPUaD6JviYTTp5GrXC1f9NnGVxlCMJMsYJok9XzIoHuz56BZ2lP4vvsAnG/9Z+f+4 /Sc= From: Thomas Schwinge To: "Zhu, Lipeng" , "H.J. Lu" CC: Jakub Jelinek , , , "Deng, Pan" , , "Li, Tianyou" , , "Guo, Wangyang" Subject: RE: [PATCH v7] libgfortran: Replace mutex with rwlock In-Reply-To: References: <20231209153944.3746165-1-lipeng.zhu@intel.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Wed, 13 Dec 2023 21:52:29 +0100 Message-ID: <87sf45su42.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Lipeng! On 2023-12-12T02:05:26+0000, "Zhu, Lipeng" wrote: > On 2023/12/12 1:45, H.J. Lu wrote: >> On Sat, Dec 9, 2023 at 7:25=E2=80=AFPM Zhu, Lipeng wrote: >> > On 2023/12/9 23:23, Jakub Jelinek wrote: >> > > On Sat, Dec 09, 2023 at 10:39:45AM -0500, Lipeng Zhu wrote: >> > > > This patch try to introduce the rwlock and split the read/write to >> > > > unit_root tree and unit_cache with rwlock instead of the mutex to >> > > > increase CPU efficiency. In the get_gfc_unit function, the >> > > > percentage to step into the insert_unit function is around 30%, in >> > > > most instances, we can get the unit in the phase of reading the >> > > > unit_cache or unit_root tree. So split the read/write phase by >> > > > rwlock would be an approach to make it more parallel. >> > > > >> > > > BTW, the IPC metrics can gain around 9x in our test server with >> > > > 220 cores. The benchmark we used is >> > > > https://github.com/rwesson/NEAT >> > > Ok for trunk, thanks. >> > Thanks! Looking forward to landing to trunk. >> Pushed for you. > Thanks for everyone's patience and help, really appreciate that! Congratulations on your first contribution to GCC (as far as I can tell)! :-) I've just filed "'libgomp.fortran/rwlock_1.f90', 'libgomp.fortran/rwlock_3.f90' execution t= est timeouts". Would you be able to look into that? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955