From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Use a non-blocking wait for set-to-domain ioctl
Date: Fri, 24 Aug 2012 02:28:45 +0200 [thread overview]
Message-ID: <20120824002845.GI5418@phenom.ffwll.local> (raw)
In-Reply-To: <1345723973-22092-1-git-send-email-chris@chris-wilson.co.uk>
On Thu, Aug 23, 2012 at 01:12:51PM +0100, Chris Wilson wrote:
> The principal use for set-to-domain is for userspace to serialise
> operations with a particular buffer, for example to maintain coherency
> with a CPU map or to ratelimit its rendering by waiting on all previous
> operations before continuing. As such we tend to hold the struct_mutex
> for long periods during the synchronisation and so cause contention
> issues with other users of the graphics device, even for independent
> operations as memory management. An example is the contention between
> compiz and X which causes jitter in the display and a drop in peak
> throughput.
>
> The ultimate solution would be a set of fine grained locks and lockless
> operations, but an intermediate step is to first attempt the
> synchronisation for set-to-domain without holding the mutex. This
> introduces a number of race conditions, so we limit it use to the ioctl
> periphery where we have no dependent state and can safely complete with
> a locked synchronisation afterwards.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Can I have the "move functions around" patch split out, please?
Also, I think it doesn't make sense to splatter nonblocking bools all over
the code:
- We won't need such a dance anywhere else, since we require userspace to
call set_domain before any cpu access anyway.
- I think hiding the mutex dropping deep down in the callchain is evil.
I.e. I'd prefer if we do the lock dropping in set_domain_ioctl itself and
just copy&pasta the required code to flush olr and whatnotelse. And since
we drop the mutex in between I actually think that the write domain
frobbery that wait_rendering does is positively harmful. But we don't need
it, so better cut it out (same applies to the retire_requests in there).
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-08-24 0:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 12:12 [PATCH 1/3] drm/i915: Use a non-blocking wait for set-to-domain ioctl Chris Wilson
2012-08-23 12:12 ` [PATCH 2/3] drm/i915: Use cpu relocations if the object is in the GTT but not mappable Chris Wilson
2012-08-24 0:29 ` Daniel Vetter
2012-08-23 12:12 ` [PATCH 3/3] drm/i915: Avoid unbinding due to an interrupted pin_and_fence during execbuffer Chris Wilson
2012-08-24 14:46 ` Daniel Vetter
2012-08-24 16:35 ` Chris Wilson
2012-08-24 18:18 ` [PATCH] " Chris Wilson
2012-08-24 19:03 ` Daniel Vetter
2012-08-24 0:28 ` Daniel Vetter [this message]
2012-08-24 8:35 ` [PATCH 1/2] drm/i915: Juggle code order to ease flow of the next patch Chris Wilson
2012-08-24 8:35 ` [PATCH 2/2] drm/i915: Use a non-blocking wait for set-to-domain ioctl Chris Wilson
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=20120824002845.GI5418@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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.