Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-04-15 Thread Thomas Schwinge
Hi! On 2021-04-09T13:00:39+0200, I wrote: > On 2021-03-25T12:02:15+0100, I wrote: >> On 2021-03-11T17:52:55+0100, I wrote: >>> On 2021-02-23T22:52:38+0100, Jakub Jelinek via Gcc-patches >>> wrote: On Tue, Feb 23, 2021 at 09:43:51PM +, Kwok Cheung Yeung wrote: > On 19/02/2021 7:12

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-04-09 Thread Thomas Schwinge
Hi! On 2021-03-25T12:02:15+0100, I wrote: > On 2021-03-11T17:52:55+0100, I wrote: >> On 2021-02-23T22:52:38+0100, Jakub Jelinek via Gcc-patches >> wrote: >>> On Tue, Feb 23, 2021 at 09:43:51PM +, Kwok Cheung Yeung wrote: On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: > I have

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-03-25 Thread Thomas Schwinge
Hi! On 2021-03-11T17:52:55+0100, I wrote: > On 2021-02-23T22:52:38+0100, Jakub Jelinek via Gcc-patches > wrote: >> On Tue, Feb 23, 2021 at 09:43:51PM +, Kwok Cheung Yeung wrote: >>> On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: >>> > I have included the current state of my patch. All

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-03-11 Thread Thomas Schwinge
Hi! On 2021-02-23T22:52:38+0100, Jakub Jelinek via Gcc-patches wrote: > On Tue, Feb 23, 2021 at 09:43:51PM +, Kwok Cheung Yeung wrote: >> On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: >> > I have included the current state of my patch. All task-detach-* tests >> > pass when executed

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 25, 2021 at 04:21:31PM +, Kwok Cheung Yeung wrote: > Reversing the order reduces the hole to 3 bytes: > > size_t num_dependees;/*80 8 */ > union { > gomp_sem_t * completion_sem; /*88 8 */ >

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Kwok Cheung Yeung
On 24/02/2021 7:46 pm, Jakub Jelinek wrote: @@ -545,8 +548,15 @@ struct gomp_task entries and the gomp_task in which they reside. */ struct priority_node pnode[3]; - bool detach; - gomp_sem_t completion_sem; + union { +/* Valid only if deferred_p is false. */ +

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 24, 2021 at 06:17:01PM +, Kwok Cheung Yeung wrote: > > 1) while linux --enable-futex and accel gomp_sem_t is small (int), rtems > > and especially posix gomp_sem_t is large; so while it might be a good > > idea to inline gomp_sem_t on config/{linux,accel} into the union,

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-24 Thread Kwok Cheung Yeung
On 22/02/2021 1:49 pm, Jakub Jelinek wrote: I see three issues with the union of completion_sem and detach_team done that way. 1) while linux --enable-futex and accel gomp_sem_t is small (int), rtems and especially posix gomp_sem_t is large; so while it might be a good idea to inline

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-23 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 23, 2021 at 09:43:51PM +, Kwok Cheung Yeung wrote: > On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: > > I have included the current state of my patch. All task-detach-* tests > > pass when executed without offloading or with offloading to GCN, but > > with offloading to Nvidia,

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-23 Thread Kwok Cheung Yeung
On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: I have included the current state of my patch. All task-detach-* tests pass when executed without offloading or with offloading to GCN, but with offloading to Nvidia, task-detach-6.* hangs consistently but everything else passes (probably because

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-22 Thread Jakub Jelinek via Gcc-patches
On Mon, Feb 22, 2021 at 02:49:44PM +0100, Jakub Jelinek wrote: > So, I think for the team != gomp_thread ()->ts.team > && !do_wake > && gomp_team_barrier_waiting_for_tasks (>barrier) > && team->task_detach_count == 0 > case, we need to wake up 1 thread anyway and arrange for it to do: >

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-22 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 19, 2021 at 07:12:42PM +, Kwok Cheung Yeung wrote: > I have opted for a union of completion_sem (for tasks that are undeferred) > and a struct gomp_team *detach_team (for deferred tasks) that holds the team > if the completion event has not yet fulfilled, or NULL if is it. I don't