Re:A tale of an impossible bug: big.LITTLE and caching
by _ihaque on Monday September 12, 2016 @02:02PM
(#12482064)
That would create a race condition addressed at the bottom of the article: the process can get switched onto another CPU between the invocation of get_current_cpu_cache_line_size() and the invalidation.
[ Parent
| on HN ]
Re:A tale of an impossible bug: big.LITTLE and caching
by K0nserv on Monday September 12, 2016 @04:30PM
(#12483352)
The follow up doesn't make sense to me
Therefore, we have to try to figure out a global minimum of the cache line sizes across all CPUs.
Wouldn't this mean they'd always just end up clearing half the cache line for larger core anyway?
Re:A tale of an impossible bug: big.LITTLE and caching
by tveita on Monday September 12, 2016 @05:01PM
(#12483648)
No, you just sometimes issue twice as many flush requests as necessary. You can't flush or invalidate half a cache line, since the data is stored in units of cache lines.
In theory I think you could just invalidate the addresses byte for byte, ignoring the cache line size, but I assume the performance hit would be noticeable.