From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by sourceware.org (Postfix) with ESMTPS id D13C23858D33; Wed, 17 Jan 2024 13:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D13C23858D33 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 D13C23858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705497938; cv=none; b=O6qElzEzHHdDgveqATaGnU8qJaCDVf/haeCm8hYX7j5Ak1K2AobQz1zzVtoeYLZ2Ra06Kpo+9vr2iYzT1HHPdfO1znM1zeqVwh8cypIxznvbwWO+t2zHGandMzgCHN59vf3OWLhsCnmZdwOPdiptqje1H7B2y5a9nGxm8faw60w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705497938; c=relaxed/simple; bh=Sd+G7lLADFW4OkhxCu2PyeSi7XzpM2QEvjkvJGTWDXo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=XdTtFFAnRouP8+DXBHlKtt8SCxsbK1Qsg+xF0XPPNI9ciP/Nmv09s9nVH98AfOkYHT7YGJk3sBTmHYa3O8ne9K8t3+X5WnQugD9ump3AQoQ2DBVAclOboq+IG3bzBPPnWjYn21jbLVGdJVQSi2XvWOTQZv4pMSdsiOhdzOO0eD0= ARC-Authentication-Results: i=1; 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=1705497936; x=1737033936; h=message-id:date:mime-version:subject:from:to:cc: references:in-reply-to:content-transfer-encoding; bh=Sd+G7lLADFW4OkhxCu2PyeSi7XzpM2QEvjkvJGTWDXo=; b=EKDVEoN7iFkA5FpFgx6hlAR2tcNwDvCk5phOhPzpE4+2951Jcik0l5lT oIY1zEWZlT4S0D9s7WWn/RRnxEDqM1g9TC8YnbK2hHLVRFdO2DiPgwnMy fIrw2CIKAGR5Xj0fL70BKUBZ9jMTere7WOQLbcmtDmLuIa9FgU5x2kd5N AeHLNTxOH9/e5XxVKNojnGDInpkSIWRLI7Ddyff0Alf3iUQOnakiwrlpE IjPftAsdzyOJMGNM8XzlVz28v1gwvFkez4JD3m2wuhODc46/AyW0xXK/5 GeqcHvrfDvID74h2CMNYjVMj0lqm0o29Aw4oFCRud49K/AsWcucrNKtE4 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="13668702" X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="13668702" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 05:25:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="777452463" X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="777452463" Received: from zhulipeng-win.ccr.corp.intel.com (HELO [10.254.208.174]) ([10.254.208.174]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 05:25:30 -0800 Message-ID: Date: Wed, 17 Jan 2024 21:25:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7] libgfortran: Replace mutex with rwlock From: Lipeng Zhu To: Thomas Schwinge 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" , Tobias Burnus , "H.J. Lu" References: <20231209153944.3746165-1-lipeng.zhu@intel.com> <87sf45su42.fsf@euler.schwinge.homeip.net> <87bkajsrx4.fsf@euler.schwinge.homeip.net> <36133fcc-5cb7-48aa-8bee-20634fd1d1de@intel.com> Content-Language: en-US Organization: Intel In-Reply-To: <36133fcc-5cb7-48aa-8bee-20634fd1d1de@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,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: On 1/3/2024 5:14 PM, Lipeng Zhu wrote: > > > On 2023/12/21 19:42, Thomas Schwinge wrote: >> 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 PM 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. >> >>> 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üße >>   Thomas >> ----------------- >> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße >> 201, 80634 München; Gesellschaft mit beschränkter Haftung; >> Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: >> München; Registergericht München, HRB 106955 >> > > Updated in https://gcc.gnu.org/PR113005. Could you help to verify if the > draft patch would fix the execution test timeout issue on your side? > Hi Thomas, Any feedback from your side? Regards, Lipeng Zhu