From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 651F93858C30 for ; Wed, 8 Mar 2023 08:13:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 651F93858C30 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52c.google.com with SMTP id u9so62441436edd.2 for ; Wed, 08 Mar 2023 00:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678263186; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qDTDY1qV//4jOfEyONCuWRvXt/XxHwk90kGXDROl8Ow=; b=fAplh3TxCxuucsSAd2+DkyE+rrN8xKxtgneMEsYARUkYxgK9Leuup3SgrmWCyintFa WwtGjhvo+w989/ELImzH7nSFgko335f9oe6/Qg2JqIsPW/QeGKWQdVgEZ1fwgAnggALp gjKu8d8qQNtKg3CsvKGlbxJdFEfbo32OAzAH40iaXGUr2+WzBMBwiC4pA5j8BvomOl8f m6wvJof7BAcq4ftcvJb9rpl/s35JHF5MrDZMjaOFksOAYDM+Yh2u83xM9oiGAgFphJV4 bjIw8G69o24fc6PTxaw47lY6P1N23IPrEftHwYuDIxavZF/yG1PP9bBHcLtvEeorpW1o FDCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678263186; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qDTDY1qV//4jOfEyONCuWRvXt/XxHwk90kGXDROl8Ow=; b=gIUPYKGDn31KpIHLDK6JqAb9E1UbZdtJ04qlcpNY4ztXTbFokSFlBxLOD4h1pSdhNW ugssXQA2/f63jfdjgiCYdL99vmVLFilab3Vvb3qSHzO1heADHcsq7hIMqWOhGvKf4BXu uIxg66NVHsTtxlC54Sghpj5Hw5hXJzEEfL5BmGIY6WqGbNeU7G/4FnSsCdoJkrPsix3O 1NMVuRigx4HrQrA427TFSxUZQE5mPp8HoV+uTg5hQMonG408Hbw255fbvhc68iHausr/ Ez4t7NultRg2ZEo93gqYe3w2vT+2H5c58mTfrwqLdWZGmUOOspLQIfp8nqAWyxBcl0sn 4+hg== X-Gm-Message-State: AO0yUKUvRqfq/HgblOd4n3pTupCq0pWkj7jM7Pij4FInlHaNx+UU6Fhe omcWMgO/Y+UamEbaj/0DB47A8GUCrR7gjPLjlBs= X-Google-Smtp-Source: AK7set8d4vIvrn1Wts9+hUZBkv6oPymKz7gxyqxWpE7KKW0ptk0JqitR7lQRY0j1d6lx9eSrsMd1v/GiDCxamEI7jJ0= X-Received: by 2002:a17:906:13c2:b0:8b1:7aec:c8e6 with SMTP id g2-20020a17090613c200b008b17aecc8e6mr8848047ejc.2.1678263185753; Wed, 08 Mar 2023 00:13:05 -0800 (PST) MIME-Version: 1.0 References: <20230308063138.1490431-1-hongyu.wang@intel.com> In-Reply-To: From: Hongyu Wang Date: Wed, 8 Mar 2023 16:07:12 +0800 Message-ID: Subject: Re: [PATCH] libgomp: Fix default value of GOMP_SPINCOUNT [PR 109062] To: Jakub Jelinek Cc: Hongyu Wang , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: > I think the right spot to fix this would be instead in initialize_icvs, > change the > icvs->wait_policy = 0; > in there to > icvs->wait_policy = -1; > That way it will be the default for all the devices, not just the > initial one. It doesn't work, for the code that determines value of wait_policy: if (none != NULL && gomp_get_icv_flag (none->flags, GOMP_ICV_WAIT_POLICY)) wait_policy = none->icvs.wait_policy; else if (all != NULL && gomp_get_icv_flag (all->flags, GOMP_ICV_WAIT_POLICY)) wait_policy = all->icvs.wait_policy; gomp_get_icv_flag (none->flags, GOMP_ICV_WAIT_POLICY) returns true only when OMP_WAIT_POLICY is explicitly set, so the initial icvs->wait_policy could not affect the global wait_policy that used to set GOMP_SPINCOUNT.