From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 11B213858D20; Thu, 14 Dec 2023 12:29:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11B213858D20 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 11B213858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702556959; cv=none; b=IPxX/5z0743ntPGHie4g8OQXw4Xn02IavRSZxnIRqWzXC3SgdF+YQMMlCDdq/19k+ZN8v3W27+4mZCEZ1hMwi+7xRjLzSR9eS/EKY/a39QOHaIOyT/E40tEpCNowhWrMrYu7hWkvV0s71XBbhThpbOo07A5Kj7oMHtsseOFJJ6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702556959; c=relaxed/simple; bh=xXrYZ/TxYtmhaj7FODMO05yT+G+MrjJFoFqKFfBmYeQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SYfFSLlGOjNWyaHbaaXFxQ8NhDOULtxpGb+KYn4XDg/wlHvvwi1yXm2RQ8/WB28wlNygO9IVVZUYV8oZTyDhpm8Zf0m1DFAGRnvyYxV4whgKE+Et85c7vFBhUTGVLUkoDas9WQGwQg4EYZfg2HexUjGO7HES5jY+IMP0AMyZHWw= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: y2NlA+b2TKCZfNoZKxXmFA== X-CSE-MsgGUID: 6yHLvPg1Tt+CENpFASjbww== X-IronPort-AV: E=Sophos;i="6.04,275,1695715200"; d="scan'208";a="25271163" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 14 Dec 2023 04:29:16 -0800 IronPort-SDR: qjFvQalKXaL/YiWXaQWcjyKEZAbqQCDzJgBJsDhK4xNjTK0SHGvxbHzDmCdodG2NvBNXyyx8R1 cn1Wq2V33tYQyL08TPpV+ZOlGF3wOcV2NqrJrqmSuixMGj2fAy9cUvWaHK5YpcmEU3Xt0O5UTk NtW42WRpLcE+jugYjk0x9cgpcygu5q46n2B+OaTgbfc5zVX4ohigKhjnMm4m80u9rIkZsV5gHf EkezPX9MePnrY12VRjR9lc31aock/C4oSfJGb9xzy/EaZMY1RLH6l1qJZuBUzYqGXU+GwPIsjo +Xk= From: Thomas Schwinge To: "Zhu, Lipeng" , "H.J. Lu" CC: Jakub Jelinek , "fortran@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" , "Deng, Pan" , "rep.dot.nop@gmail.com" , "Li, Tianyou" , "tkoenig@netcologne.de" , "Guo, Wangyang" Subject: RE: [PATCH v7] libgfortran: Replace mutex with rwlock In-Reply-To: References: <20231209153944.3746165-1-lipeng.zhu@intel.com> <87sf45su42.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Thu, 14 Dec 2023 13:29:01 +0100 Message-ID: <8734w57ysy.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-13.mgc.mentorg.com (139.181.222.13) 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-14T02:28:22+0000, "Zhu, Lipeng" wrote: > On 2023/12/14 4:52, Thomas Schwinge wrote: >> 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 >> I've just filed >> "'libgomp.fortran/rwlock_1.f90', 'libgomp.fortran/rwlock_3.f90' executio= n >> test timeouts". >> Would you be able to look into that? > Sure, I will look into that. > > BTW, I didn=E2=80=99t have the PowerPC in hands, do you mind granting the= access of your > test environment to me to help reproduce the issue? That's unfortunately not possible: it's behind company VPN, restricted access. :-/ I'll later try to have at least a quick look where it's hanging, or what it's doing. 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