From: Daniel Stone <daniel@fooishbar.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Jason Ekstrand <jason@jlekstrand.net>
Subject: Re: EPOLL for drm_syncfile (was Re: [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6))
Date: Sun, 23 May 2021 22:34:16 +0100 [thread overview]
Message-ID: <CAPj87rOdE35n4yCe6U_384u0YR4oZ=zb9wKOH4PKEC4Ti5gUSg@mail.gmail.com> (raw)
In-Reply-To: <0a54d998-1c4b-724c-ec2d-a6c23aa35c21@amd.com>
Hi Christian,
On Sun, 23 May 2021 at 18:16, Christian König <christian.koenig@amd.com> wrote:
> Am 22.05.21 um 22:05 schrieb Daniel Stone:
> > Anyway, the problem with syncobj is that the ioctl to wait for a
> > sync_file to materialise for a given timeline point only allows us to
> > block with a timeout; this is a non-starter, because we need something
> > which fits into epoll. The most optimal case is returning a new
> > eventfd or similar which signals when a given timeline point becomes
> > available or signaled, but in extremis a syncobj FD becoming readable
> > when any activity which would change the result of any zero-timeout
> > wait on that syncobj is more or less workable.
>
> I think the tricky part is to epoll for a certain value.
>
> Not sure how eventfd is supposed to work, but IIRC we don't have the
> functionality to poll for a certain value/offset etc to become available.
>
> We could of course create a separate fd for each requested value to poll
> for thought, but that sounds like a bit much overhead to me.
Yeah, I understand the point; something like an eventfd is exactly
what you think, that we would have to materialise a new FD for it. On
the other hand, as soon as the sync point becomes available, the
winsys will want to immediately extract a sync_file from it, so I
don't think FD amplification is a big issue. If it looks like being a
problem in practice, we could look at providing a FD which starts off
inert, and only later becomes a sync_file after it polls readable, but
that sounds like something we really want to avoid if we can.
Cheers,
Daniel
next prev parent reply other threads:[~2021-05-23 21:34 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 19:00 [PATCH 0/4] dma-buf: Add an API for exporting sync files (v8) Jason Ekstrand
2021-05-20 19:00 ` [PATCH 1/4] dma-buf: add dma_fence_array_for_each (v2) Jason Ekstrand
2021-05-21 7:51 ` Christian König
2021-05-21 16:27 ` Jason Ekstrand
2021-05-21 18:11 ` Christian König
2021-05-20 19:00 ` [PATCH 2/4] dma-buf: add dma_resv_get_singleton_rcu (v4) Jason Ekstrand
2021-05-21 17:48 ` Daniel Vetter
2021-05-24 20:04 ` Jason Ekstrand
2021-05-25 12:38 ` Daniel Vetter
2021-05-25 15:50 ` Christian König
2021-05-22 14:38 ` kernel test robot
2021-05-22 18:59 ` kernel test robot
2021-05-20 19:00 ` [PATCH 3/4] dma-buf: Add an API for exporting sync files (v9) Jason Ekstrand
2021-05-20 19:00 ` [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6) Jason Ekstrand
2021-05-22 20:05 ` Daniel Stone
2021-05-23 17:15 ` EPOLL for drm_syncfile (was Re: [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6)) Christian König
2021-05-23 21:34 ` Daniel Stone [this message]
2021-05-25 5:55 ` Daniel Vetter
2021-05-26 9:45 ` Simon Ser
2021-05-24 17:11 ` [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6) Jason Ekstrand
2021-05-25 6:27 ` Daniel Vetter
2021-05-26 11:08 ` Daniel Stone
2021-05-26 12:35 ` Daniel Vetter
2021-05-26 13:08 ` Daniel Stone
2021-05-26 13:44 ` Daniel Vetter
2021-05-26 15:13 ` Daniel Stone
2021-05-26 16:52 ` Daniel Vetter
2021-05-26 18:01 ` Daniel Stone
2021-05-27 7:21 ` Christian König
2021-05-26 13:52 ` Daniel Stone
2021-05-26 15:24 ` Jason Ekstrand
2021-05-26 18:14 ` Daniel Stone
2021-05-27 4:32 ` Jason Ekstrand
2021-05-27 10:19 ` Daniel Vetter
2021-05-27 10:39 ` Christian König
2021-05-26 12:21 ` Vlad Zahorodnii
2021-05-21 21:32 ` [PATCH 0/4] dma-buf: Add an API for exporting sync files (v8) Jason Ekstrand
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='CAPj87rOdE35n4yCe6U_384u0YR4oZ=zb9wKOH4PKEC4Ti5gUSg@mail.gmail.com' \
--to=daniel@fooishbar.org \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
/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 NNTP newsgroup(s).