Talking about the b_sate reads (__buffer_state()), IMO it would be
safer to change __buffer_state to use test_bit to avoid the
compiler to cache the b_state variable in registers (b_state is not
volatile).
This was specifically changed to not use test_bit so that the
compiler _can_ combine multiple bit tests into a single check.
Last I checked, all the places where multiple bit state checks are
done are safe and are guarded by other locking mechanisms already.
Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/