From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: Only insert the mb() before updating the fence parameter
Date: Thu, 11 Oct 2012 12:41:53 -0700 [thread overview]
Message-ID: <20121011124153.320ea65e@jbarnes-desktop> (raw)
In-Reply-To: <1349807080-9005-1-git-send-email-chris@chris-wilson.co.uk>
On Tue, 9 Oct 2012 19:24:37 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> With a fence, we only need to insert a memory barrier around the actual
> fence alteration for CPU accesses through the GTT. Performing the
> barrier in flush-fence was inserting unnecessary and expensive barriers
> for never fenced objects.
>
> Note removing the barriers from flush-fence, which was effectively a
> barrier before every direct access through the GTT, revealed that we
> where missing a barrier before the first access through the GTT. Lack of
> that barrier was sufficient to cause GPU hangs.
>
> v2: Add a couple more comments to explain the new barriers
>
The docs are slippery on MMIO vs cached accesses (less so on actual I/O
port ops), but this does look correct.
You might improve the comments a little and quote the IA32 manuals a
bit, saying that you're trying to order previous cached accesses with
subsequent MMIO accesses that will affect what the CPU reads or writes.
Other than that:
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
prev parent reply other threads:[~2012-10-11 19:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6c3329lntgg@orsmga002.jf.intel.com>
2012-10-09 18:24 ` [PATCH 1/4] drm/i915: Only insert the mb() before updating the fence parameter Chris Wilson
2012-10-09 18:24 ` [PATCH 2/4] drm/i915: Only apply the mb() when flushing the GTT domain during a finish Chris Wilson
2012-10-11 19:43 ` Jesse Barnes
2013-01-19 13:40 ` Daniel Vetter
2012-10-09 18:24 ` [PATCH 3/4] drm/i915: Insert a full mb() before reading the seqno from the status page Chris Wilson
2012-10-11 19:46 ` Jesse Barnes
2012-10-19 20:40 ` Chris Wilson
2012-10-19 20:52 ` Jesse Barnes
2013-01-19 12:02 ` Chris Wilson
2012-10-09 18:24 ` [PATCH 4/4] drm/i915: Review the memory barriers around CPU access to buffers Chris Wilson
2012-10-11 19:52 ` Jesse Barnes
2012-10-19 20:48 ` Chris Wilson
2012-10-11 20:46 ` Daniel Vetter
2012-10-11 19:41 ` Jesse Barnes [this message]
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=20121011124153.320ea65e@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox