Linus Torvalds writes: (Summary) On Tue, Oct 17, 2017 at 3:33 AM, Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
Hmm. I can see why the compiler would do that (16-bit accesses are slow), but it's definitely wrong.
slow), but it's definitely wrong.
Does it work ok if that slob_units() code is written as Does it work ok if that slob_units() code is written as static slobidx_t slob_units(slob_t *s)
[...]
boundary and this issue happend.Hmm. I can see why the compiler would do that (16-bit accesses are slow), but it's definitely wrong.
slow), but it's definitely wrong.
Does it work ok if that slob_units() code is written as Does it work ok if that slob_units() code is written as static slobidx_t slob_units(slob_t *s)
{ int units = READ_ONCE(s->units); if (units > 0) return units; } which might be an acceptable workaround for now?