[Intel-gfx] [PATCH] drm/i915/selftests: Provide full mb() around clflush
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri Jul 6 20:31:56 UTC 2018
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 at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list