From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105072 invoked by alias); 1 Feb 2020 16:37:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 105052 invoked by uid 89); 1 Feb 2020 16:37:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Feb 2020 16:37:41 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 1664A1281C; Sat, 1 Feb 2020 17:37:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1580575059; bh=Qhk9xacz2Kf4EhdIUhJyN543UwVi67iWS0b4DwN1bjg=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To:From; b=N7W1X5Iu6/WIXQNqTKma8jft8Y9weVOiycL3f6buJ4GF9Z7sjhj9nRidF657x3zQI XItNcbGZII3RN3pkEIxnIcR4QX3CT9uayD5HegEuufMJqMki3IlWV6LpG5tsaK1zeB zqE8SlpBtqvme8DFjalSmxQ0FFGGBbEA5Sl2ylCzdWE88fRfS/Le4aY5fJE8T+wFuQ KhfdsFGLvMUoUJgnZMeD3vB/Pjim9FB/LG9hkiZIjVqX0fhW4RqMyVvuVhb550EJdm bt8lBmGBYNCiOq/pwgVpkId0r1eXNp0Wv5bFflsopk8RovVyMHfZM8QfcHKlOPMkxc lO3fiymGMreLQ== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 12F4711EE6; Sat, 1 Feb 2020 17:37:39 +0100 (CET) Received: from [2001:4dd7:567a:0:b59c:f8e4:2815:7ab7] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.11.6) (envelope-from ) id 5e35a953-45d8-7f0000012729-7f000001bba4-1 for ; Sat, 01 Feb 2020 17:37:39 +0100 Received: from linux-p51k.fritz.box (2001-4dd7-567a-0-b59c-f8e4-2815-7ab7.ipv6dyn.netcologne.de [IPv6:2001:4dd7:567a:0:b59c:f8e4:2815:7ab7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Sat, 1 Feb 2020 17:37:35 +0100 (CET) Subject: Re: [PATCH] libgfortran: Fix and simplify IO locking [PR92836] To: Janne Blomqvist , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org References: <20200131133753.29995-1-blomqvist.janne@gmail.com> From: Thomas Koenig Message-ID: <6ec6fa7c-c90b-84ad-aa5a-5d79a9a10f5b@netcologne.de> Date: Sat, 01 Feb 2020 16:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200131133753.29995-1-blomqvist.janne@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00021.txt.bz2 Hi Janne, > Simplify IO locking in libgfortran. The new IO implementation avoids > accessing units without locks, as seen in PR 92836. It also avoids > lock inversion (except for a corner case wrt namelist query when > reading from stdin and outputting to stdout), making it easier to > verify correctness with tools like valgrind or threadsanitizer. It is > also simplified as the waiting and closed variables are not needed > anymore, making it easier to understand and analyze. > > Regtested on x86_64-pc-linux-gnu, Ok for master? I'll look into it, this might take a bit of time. What are you planning to use as a test case? You can put multighreading programs into libgomp/testsuite/libgomp.fortran where they will be executed. Regards Thomas