bit fields && data tearing

One Thousand Gnomes gnomes at lxorguk.ukuu.org.uk
Fri Sep 5 02:50:44 EST 2014


> Besides updating the documentation, it may make sense to do something
> arch-specific. Just bumping out storage on arches that don't need it
> seems wasteful, as does generating bus locks on arches that don't need it.
> Unfortunately, the code churn looks unavoidable.

The arch specific is pretty much set_bit and friends. Bus locks on a
locally owned cache line should not be very expensive on anything vaguely
modern, while uniprocessor boxes usually only have to generate set_bit
as a single instruction so it is interrupt safe.

Alan


More information about the Linuxppc-dev mailing list