The SDM reference is admittedly a little fuzzy on the required fencing, but an SFENCE has no impact on the streaming loads. MFENCE is required to enforce the ordering of the streaming loads.
Joe -----Original Message----- From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] Sent: Tuesday, October 06, 2015 12:13 To: Justen, Jordan L Cc: Matt Turner; mesa-dev@lists.freedesktop.org; Nuzman, Joseph Subject: Re: [Mesa-dev] [PATCH] mesa: Add missing _mm_mfence() before streaming loads. On Mon, Oct 05, 2015 at 12:01:25PM -0700, Jordan Justen wrote: > On 2015-10-05 11:55:57, Matt Turner wrote: > > On Thu, Oct 1, 2015 at 11:20 AM, Jordan Justen > > <jordan.l.jus...@intel.com> wrote: > > > On 2015-10-01 10:11:33, Matt Turner wrote: > > >> According to the Intel Software Development Manual: > > > > > > How about a more specific doc location? > > > > > > According to the Intel Software Development Manual (Volume 1: > > > Basic Architecture, 12.10.3 Streaming Load Hint Instruction): > > > > Sure. Thanks for looking that up for me. > > > > >> Streaming loads may be weakly ordered and may appear to software to > > >> execute out of order with respect to other memory operations. > > >> Software must explicitly use fences (e.g. MFENCE) if it needs to > > >> preserve order among streaming loads or between streaming loads and > > >> other memory operations. > > > > > > Does this mean we need a mfence following the load as well? > > > > I didn't think so, and Joseph has confirmed. > > > > Can I consider this a Reviewed-by? > > Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com> I believe you only need a SFENCE here not a full MFENCE. -Chris -- Chris Wilson, Intel Open Source Technology Centre --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev