public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: 김규래 <msca8h@naver.com>
Cc: gcc@gcc.gnu.org
Subject: Re:  Re: [GSoC'19, libgomp work-stealing] Task parallelism runtime
Date: Mon, 24 Jun 2019 20:13:00 -0000	[thread overview]
Message-ID: <20190624201333.GN815@tucnak> (raw)
In-Reply-To: <6a134c304322d74212af4cb92605853@cweb007.nm.nfra.io>

On Tue, Jun 25, 2019 at 04:55:17AM +0900, 김규래 wrote:
> I'm not very familiar with the gomp plugin system.
> However, looking at 'GOMP_PLUGIN_target_task_completion' seem like tasks have to go in and out of the runtime.
> In that case, is it right that the tasks have to know from which queue they came from?
> I think I'll have to add the id of the corresponding queue of each task in the gomp_task structure.

While libgomp has a plugin system, the only supported plugins are those in
the tree, i.e. libgomp/plugin/plugin-{hsa,nvptx}.c and
liboffloadmic/plugin/*
nvptx plugin doesn't have async support ATM, so it is just hsa and xeonphi
offloading that can call it when an asynchronous target region execution is
over.  No matter in which task queue the task is, gomp_target_task_completion
needs to ensure that if something already waits on it (taskwait, taskgroup
end, barrier, dependency wait), that it is awaken.
And, like for other parts of task.c, there needs to be a design what lock
is used to protect any code that needs to be guarded.
The current code as you know uses team->task_lock as a big lock, I think
with the separate workqueues + work stealing you need per implicit task lock
+ the per team (team->task_lock), design the locking such that there is no
ABBA deadlock possibility and that you use the team task lock only when
really necessary (not sure, but perhaps one example where I really don't see
much way to avoid the per team lock are task dependencies, the hash table
for that etc.).

	Jakub

  reply	other threads:[~2019-06-24 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e2a9f7c55311795785d0f2c47f70acbd@cweb001.nm.nfra.io>
2019-06-24 19:55 ` 김규래
2019-06-24 20:13   ` Jakub Jelinek [this message]
2019-07-13  7:46   ` John Pinkerton
2019-07-09 12:56 ` 김규래
2019-07-13  6:28   ` Jakub Jelinek
2019-07-21  7:46     ` 김규래
2019-07-22 18:54       ` Jakub Jelinek
2019-07-22 19:00         ` 김규래
2019-08-03  9:12           ` 김규래
2019-08-05 10:32             ` Jakub Jelinek
2019-08-05 11:01               ` 김규래
     [not found]                 ` <20190819061020.GA27842@laptop.zalov.cz>
2019-08-25  7:49                   ` 김규래

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=20190624201333.GN815@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=msca8h@naver.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).