CACHE_LINE_SIZE macro.
Warner Losh
imp at bsdimp.com
Mon Nov 5 18:26:13 UTC 2012
On Nov 5, 2012, at 11:12 AM, Eitan Adler wrote:
> On 5 November 2012 13:09, Ian Lepore <freebsd at damnhippie.dyndns.org> wrote:
>> The other thing that bugs me is that cache is a scarce resource on our
>> wimpy little platforms, and padding just ensures that we use it even
>> less effectively in the UP case. It seems like it's more likely to kill
>> performance than improve it, because one would expect that when a lock
>> is embedded in a structure, there's going to be access to other data
>> nearby once the lock is acquired.
>
> This is another reason to encourage the separation between the real
> cache line size and the lock padding version. On low cache-size
> environments the latter could be tuned to not matter.
Yea, we definitely need to separate out the difference between 'padding for performance' which CACHE_LINE_SIZE does (and perhaps we need several flavors), padding for correctness (which is needed for DMA correctness wrt non-coherent cache architectures) and padding because padding always helps, right?
Warner
More information about the freebsd-mips
mailing list