Re: [patch] flushpage SMP race with ll_rw_block/bdflush

David S. Miller (davem@redhat.com)
Thu, 2 Sep 1999 01:50:59 -0700


Date: Thu, 2 Sep 1999 10:46:01 +0200 (CEST)
From: Andrea Arcangeli <andrea@suse.de>

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/