News for hackers. Stuff that matters.
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.

  An astute reader might realize that computing the cache line on every
  invocation is not enough for user space code: It can happen that a process
  gets scheduled on a different CPU while executing the __clear_cache
  function with a certain cache line size, where it might not be valid
  anymore.
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.