intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/selftests: Provide full mb() around clflush
Date: Fri, 6 Jul 2018 13:31:56 -0700	[thread overview]
Message-ID: <20180706203156.GD23473@intel.com> (raw)
In-Reply-To: <153090886221.7594.9469545348039815576@cwilso3-mobl.ger.corp.intel.com>

On Fri, Jul 06, 2018 at 09:27:47PM +0100, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2018-07-06 21:23:00)
> > On Fri, Jul 06, 2018 at 06:49:26PM +0100, Chris Wilson wrote:
> > > clflush is an unserialised instruction and the IA manual strongly advises
> > > you to serialise it with a mb. To be cautious, apply one before and one
> > > after,
> > 
> > my understanding is that we need one before and one after anyways,
> > not just a matter of being cautious for being cautious..
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> If you are really careful, you can reduce it to a mb between writes and
> the clflush; and vice verse, the mb between clflush and subsequent
> reads. It's all about prevent the clflush from overtaking or being
> overtaken by the operations it is meant to flush or invalidate
> respectively.
> 
> But since we're being paranoid here, do both.

hm... makes sense... better to be paranoid...

> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-07-06 20:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 17:49 [PATCH] drm/i915/selftests: Provide full mb() around clflush Chris Wilson
2018-07-06 17:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-07-06 18:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-06 20:23 ` [PATCH] " Rodrigo Vivi
2018-07-06 20:27   ` Chris Wilson
2018-07-06 20:31     ` Rodrigo Vivi [this message]
2018-07-07 18:32 ` ✓ Fi.CI.IGT: success for " Patchwork

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=20180706203156.GD23473@intel.com \
    --to=rodrigo.vivi@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).