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 37C913858D37 for ; Fri, 28 Apr 2023 10:51:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37C913858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="3798163" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 28 Apr 2023 02:51:37 -0800 IronPort-SDR: p6/lnoOTkbH+9EuLjNhunFIEcr/0k2304ev3Ru0Zh6f+9yzbHg1PupfAaxNl4ug59foCYKo/xt xeuPEe05O8TbiWuk9PpCnzod457Yr6Xnr5nI2xlLJk9BuvrFiYcbckUt8JWeXzamsZkFiRZOkh Kesw4/BFZyHLGUmiwQRf054es7mCUjbEiz9wVcRPOezjm5u4ZUBWf0bvo7vBd0eE62oChW0D8I UuMEFHSQpzvZvkozTHEV0JwZ3hOgJln3+esrlExCzAmUkw1QmpP/Pja6k5/1E86m7CwYeLW9m3 xa4= Message-ID: <34c013ac-f0c7-eaeb-3630-b900680c4a15@codesourcery.com> Date: Fri, 28 Apr 2023 12:51:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation (was: [Patch] libgomp/nvptx: Prepare for reverse-offload callback handling) To: Thomas Schwinge CC: Jakub Jelinek , References: <57b3ae5e-8f15-8bea-fa09-39bccbaa2414@codesourcery.com> <87r0ti9k3o.fsf@euler.schwinge.homeip.net> <791cd5c2-a478-7b02-27b5-84371b63e371@codesourcery.com> <87354kcq00.fsf@euler.schwinge.homeip.net> Content-Language: en-US From: Tobias Burnus In-Reply-To: <87354kcq00.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_PASS,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: On 28.04.23 11:31, Thomas Schwinge wrote: > On 2023-04-28T10:48:31+0200, Tobias Burnus wrot= e: >> I don't think that just calling "exit (EXIT_FAILURE);" is the the proper >> way > The point is, when we run into such an 'exit', we've already issued an > error (in the plugin, via 'GOMP_PLUGIN_fatal'), you meant: GOMP_PLUGIN_error. > and then (to replicate > what 'GOMP_PLUGIN_fatal'/'gomp_fatal' do) we just need to 'exit' -- after > unlocking. The latter is the reason why we can't just do this: > >> =E2=80=93 I think that should be GOMP_PLUGIN_fatal in the plugin and >> gomp_fatal in target.c. > ..., because we'd dead-lock due to 'atexit' shutdown of devices etc., > while still having devices etc. locked. > > (Resolving all this differently/"properly" is for another day.) =E2=86=92 https://gcc.gnu.org/PR109664 >> Otherwise, it LGTM. > Thanks. OK to push then, given the rationale above? OK. Tobias ----------------- 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