[Mesa-dev] [PATCH 7/7] i965: Drop non-LLC lunacy in the program cache code.

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 24 09:48:27 UTC 2017


Quoting Kenneth Graunke (2017-07-24 02:03:23)
> On Saturday, July 22, 2017 2:28:06 AM PDT Chris Wilson wrote:
> > Considering the prevalence of sse4.1, another candidate is
> > brw_get_buffer_subdata(), we could use a WC map there as well.
> 
> Your thinking is...avoid polluting the CPU cache, since we're basically
> going to be reading a continuous chunk of buffer data once, and never
> accessing it again?

Yes, my thought is to avoid instantiating a different type of WB
mmapping since we are more likely to already have a WC map of the buffer
object for writing. Which avoids pulling the buffer into the CPU cache
alongside the user's data - especially as the writes will not use that
cache.
 
> UC + movntdqa might be pretty reasonable there.  WC doesn't buy us much
> considering it's a read-only map but I guess it doesn't hurt either...

One caller's UC mmap for reads is another's WC mmap for writes ;)
-Chris


More information about the mesa-dev mailing list