From: Hongyu Wang <wwwhhhyyy333@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Hongyu Wang <hongyu.wang@intel.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libgomp: Fix default value of GOMP_SPINCOUNT [PR 109062]
Date: Wed, 8 Mar 2023 16:21:46 +0800 [thread overview]
Message-ID: <CA+OydW=RyumvMfggDeYJh3PXUPkmeBk4XtU02bGpbnk7brwfLA@mail.gmail.com> (raw)
In-Reply-To: <CA+OydWn1gHx8-9GKhBQkcVxG7nBBh_f9s8k1WFmGFnVXkKs=ew@mail.gmail.com>
Hongyu Wang <wwwhhhyyy333@gmail.com> 于2023年3月8日周三 16:07写道:
>
> > 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.
Also the global variable wait_policy here is only used for setting
spin_count related values that do not
belong to any ICV, so there is no need to set icvs->wait_policy since
for OMP_WAIT_POLICY_(DEV|ALL)
itself only has value 0 for passive and value 1 for active.
next prev parent reply other threads:[~2023-03-08 8:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 6:31 Hongyu Wang
2023-03-08 7:35 ` Jakub Jelinek
2023-03-08 8:07 ` Hongyu Wang
2023-03-08 8:21 ` Hongyu Wang [this message]
2023-03-08 8:35 ` Jakub Jelinek
2023-03-08 8:54 ` Hongyu Wang
2023-03-08 9:03 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+OydW=RyumvMfggDeYJh3PXUPkmeBk4XtU02bGpbnk7brwfLA@mail.gmail.com' \
--to=wwwhhhyyy333@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongyu.wang@intel.com \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).