From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 966E53858C52; Thu, 21 Dec 2023 11:42:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 966E53858C52 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 966E53858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703158968; cv=none; b=KiW71b920I2k6Y/Ebht8/OLoqXUh3zSwBMXSbxS43W1WMONJ2+wUDn8InC9MuFG2WWupA3FMH9Dd3iPTHQDeODnvjmSVvP4bXQYCXiiymbcQ7AwQEKZ8gc5/XiP4YxPwUybxxP88cCs59IOk2s5fM95iHsHnFczC35Qr/zk0Jj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703158968; c=relaxed/simple; bh=Qg0CwoP8uDLUUGiQ72oAVc75jJ9fOk9bXFGGShmibwc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hy6RZJfx/g7wpaxWWeZ7zQRX89RBor7TDU4+gVo/FoYudnZsy75RdkZlFjxPPFduCyGkP6aWr0yyFcm8vx+B63SN9O+5ctcomH8BO6PVzQeul85C5jdhz0fAfEOY3C5qbVilACUnDkNonVL9YAo+2NTY6jEnnQ7CZBcCiPxtCiY= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: 3vywUnkyR4u/m86UNYkBOg== X-CSE-MsgGUID: A+45JPwkR3qEyCrIgLdhCg== X-IronPort-AV: E=Sophos;i="6.04,293,1695715200"; d="scan'208";a="25915318" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 21 Dec 2023 03:42:44 -0800 IronPort-SDR: u/5qyswREgM87ec01xDWaXFJaMh9K7mDquK/VfT9RAlkAE+9SpkA10ReoZ9SOQIl7w5aX/43WO mXslXep+WQanA81cU36CeInkIeismgUTDE5vtydFfk417S/1nFkAFQE0uSyZHF+rRzIWDLVM9P YlrG1/wFR6Xpry+GpHE69WTKnZ9+fe73TxRP8BONYnxSfgWD8cgnJc+EKZ98HvC1Ly2O2OTkoj 85A0ERoiDS9SpI+itpGHldl2IWaR6qDNOKZecLeiwvBfMClGUyoPaGRtiO4/lbq7ZWeIgY/IYm VFo= From: Thomas Schwinge To: "Zhu, Lipeng" , "H.J. Lu" CC: Jakub Jelinek , , , "Deng, Pan" , , "Li, Tianyou" , , "Guo, Wangyang" , "Tobias Burnus" Subject: RE: [PATCH v7] libgfortran: Replace mutex with rwlock In-Reply-To: <87sf45su42.fsf@euler.schwinge.homeip.net> 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, 21 Dec 2023 12:42:31 +0100 Message-ID: <87bkajsrx4.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-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.7 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! On 2023-12-13T21:52:29+0100, I 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 t= o >>> > > > 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%, i= n >>> > > > 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. > I've just filed > "'libgomp.fortran/rwlock_1.f90', 'libgomp.fortran/rwlock_3.f90' execution= test timeouts". > Would you be able to look into that? See my update in there. 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