From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <christian.koenig@amd.com>
Cc: Maarten Lankhorst <m.b.lankhorst@gmail.com>,
Zach Pfeffer <zpfeffer@audience.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
John Harrison <John.C.Harrison@intel.com>,
gpudriverdevsupport <gpudriverdevsupport@amd.com>
Subject: Re: Question on UAPI for fences
Date: Mon, 15 Sep 2014 10:46:52 +0200 [thread overview]
Message-ID: <20140915084652.GJ4740@phenom.ffwll.local> (raw)
In-Reply-To: <54156FBB.5010005@amd.com>
On Sun, Sep 14, 2014 at 12:36:43PM +0200, Christian König wrote:
> Yeah, right. Providing the fd to reassign to a fence would indeed reduce the
> create/close overhead.
>
> But it would still be more overhead than for example a simple on demand
> growing ring buffer which then uses 64bit sequence numbers in userspace to
> refer to a fence in the kernel.
>
> Apart from that I'm pretty sure that when we do the syncing completely in
> userspace we need more fences open at the same time than fds are available
> by default.
If you do the syncing completely in userspace you don't need kernel fences
at all. Kernel fences are only required if you sync with a different
process (where the pure userspace syncing might not work out) or with
different devices.
tbh I don't see any use-case at all where you'd need 10k such fences. That
means your driver gets to deal with 2 kinds of fences, but so be it. Since
not using fds for cross-device or cross-process syncing imo just doesn't
make sense, so that one pretty much will have to stick.
> As long as our internal handle or sequence based fence are easily
> convertible to a fence fd I actually don't really see a problem with that.
> Going to hack that approach into my prototype and then we can see how bad
> the code looks after all.
My plan for i915 is to start out with fd fences only, and once we have
some clarity on the exact requirements probably add some pure
userspace-controlled fences for tightly coupled stuff. Those might be
fully internal to the opencl userspace driver though and never get out of
there, ever.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-09-15 8:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 13:23 Question on UAPI for fences Christian König
2014-09-12 14:09 ` Daniel Vetter
2014-09-12 14:43 ` Daniel Vetter
2014-09-12 14:50 ` Jerome Glisse
2014-09-12 15:13 ` Daniel Vetter
2014-09-12 15:25 ` Alex Deucher
2014-09-12 15:33 ` Jerome Glisse
2014-09-12 15:38 ` Alex Deucher
2014-09-12 15:42 ` Christian König
2014-09-12 15:48 ` Jerome Glisse
2014-09-12 15:58 ` Christian König
2014-09-12 16:03 ` Jerome Glisse
2014-09-12 16:08 ` Christian König
2014-09-12 16:38 ` John Harrison
2014-09-13 12:25 ` Christian König
2014-09-14 0:32 ` Marek Olšák
2014-09-14 10:36 ` Christian König
2014-09-15 8:46 ` Daniel Vetter [this message]
2014-09-12 16:45 ` Jesse Barnes
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=20140915084652.GJ4740@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=John.C.Harrison@intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gpudriverdevsupport@amd.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=m.b.lankhorst@gmail.com \
--cc=zpfeffer@audience.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.