From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id E939E3858D32; Thu, 2 Nov 2023 09:58:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E939E3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E939E3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698919143; cv=none; b=VW8iyPZ5OgMqEXVhJTvIqj7jnHwHFugIjiWkk2JYAVbhfZLhqu+kw2vgqvFZRT6zS2qbe0W5et/9oAeHPzK/pnS+VblsboXoS2RSFR6EagGx7VfZ98vwZgi9IKxkcA/n2/t9Pg+1FUnMzXkQi3AOzV0jnYjaGNB80jxXoJWGRAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698919143; c=relaxed/simple; bh=3ZTjCIpOHHtg/Wmkv/WzZmLhDuTCzJ64TdQwaasJgiw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=V9lS6QYpAh9376OXMrsZlH8aogSzRd6auXxYGHi52Btl+7PX71Atm3B/ylqiodjpuFyh0U/bKk4U03siIYDgT7t7zTRUkY5JfpdkysjWNffHz7USDqgG1t7z2AOeIPwSGgCUoB65yZzt+jv157DEAsFlsQgZqKpfeXq/HWpXVtE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32fb1c35fe0so9784f8f.1; Thu, 02 Nov 2023 02:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698919131; x=1699523931; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=P/KQjfKGnTpdic0x1Rvzoa0iDwOC5nrz6dtoXYaGG38=; b=HiE66ZweRYdpaBwjG6mzeU2dyvVYWqhDxRhgPfEqPE1YR0g2OuJ8tU9jDnr8qifIjE tA04pNcdXtLK77hy6GERABQ981ZyRI27+KhaivNtk13NdmKF0Vx+0SRvo4dgIS9hW7pU GfNQoF5U4fl6FJ3LwQcZXMVjWmImeny1/bvluu7fk1DwnyxaEwzeWKMz1zJhA1Y2enbM 58dXjlsXrrZooFCUvOlPu1wrJ2sPVBcmiAyLVU65+uBUkfksrQfmXPnBu8GfoFz/CxFg SPEw/SkpscmCv+1zfl4FEDj+TtqJXMHgmE8pkjjRatrpaXYYIgxoJ3zRTfjVnIix1qqK pL+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698919131; x=1699523931; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P/KQjfKGnTpdic0x1Rvzoa0iDwOC5nrz6dtoXYaGG38=; b=MPWh2Lswj3O7iJ0a2cFuPXVcAaiNQq27uh1g/6gT40aACCtyaqM5iV6pliLCCWn3yn aLbqQHpu7s5T7dUW0EklFUTF2WmWT5fhLLB7vspriyrEMVy0BEbiPiSQ89Q5fAsoYmxV aA2Nqr2fFkyQOXy4p18JE1HjVYcovTsKm0wlawhsPF/qTmZGD6lwuJfOAwNkFBC6s+KK WXCcZbK28pFi29ZZV6Ja4LM/0HpQ+AeZc+9CItso0y+d3T98Rkf96PoMpDLCuvEEFfQ5 IRFtQxu2y9tPEiAZImDvq3DtEtod+ws86+6UnCkAJie5w4a2KWn/j/GtOcSJdB5kK8IM d3mw== X-Gm-Message-State: AOJu0YwmYMw1pgeiH7IG5JRig/RM6NVHojkcudqlfJQCjolLeUR21uJx qyWiDCvf918hp8B7k4XifR4= X-Google-Smtp-Source: AGHT+IHJFhLrYgscPW6icYNk9qhiNggoSesZ7UVtnO+8FqYl1Tugop9VsbAi0bWn99KoQKOC/JVgLg== X-Received: by 2002:a5d:5985:0:b0:32f:9ec8:2aa4 with SMTP id n5-20020a5d5985000000b0032f9ec82aa4mr4500959wri.45.1698919131339; Thu, 02 Nov 2023 02:58:51 -0700 (PDT) Received: from nbbrfq.loc ([2001:871:227:b560:2468:ea59:3c5:d50f]) by smtp.gmail.com with ESMTPSA id dh6-20020a0560000a8600b0032da8fb0d05sm1932467wrb.110.2023.11.02.02.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:58:50 -0700 (PDT) Date: Thu, 2 Nov 2023 10:58:47 +0100 From: Bernhard Reutner-Fischer To: "Zhu, Lipeng" Cc: rep.dot.nop@gmail.com, Jakub Jelinek , Thomas Koenig , "fortran@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" , "Lu, Hongjiu" , "Li, Tianyou" , "Deng, Pan" , "Guo, Wangyang" , ian@airs.com Subject: Re: [PATCH v4] libgfortran: Replace mutex with rwlock Message-ID: <20231102105847.2b48a607@nbbrfq.loc> In-Reply-To: References: <81c359ae-ab69-7f03-f113-4b865441de44@intel.com> <9e30db8a-2a6f-89d0-84fb-2f549f61954c@intel.com> <93b9e2d5-4355-136a-a961-da1ae9c1468f@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 lock. > > > >>> 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 help. > > > > > 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 appreciated. Latest version is at https://inbox.sourceware.org/gcc-patches/20230818031818.2161842-1-lipeng.zhu@intel.com/ > > > Best Regards, > > Lipeng Zhu >