RE: Cache coherency... and locking

From: Tigran Aivazian (tigran@veritas.com)
Date: Sat Jul 22 2000 - 09:12:32 EST


On Fri, 21 Jul 2000, Linda Walsh wrote:
> I'm still getting some emails from
> folks who think that the case w/o locking should work fine.

maybe because it is easier to look at the code than to understand the
subtleties of English language. If you show us the code that protects the
variable with a lock then it would be much easier for people to say "No,
you don't need a lock here".

big reader spinlocks are optimized for large number of frequent readers
and few infrequent writers. If your scenario fits this - use it, i.e. if
you _do_ need a lock at all. All the mails in this thread were interesting
but none convinced me that you need a lock at all (as long you are
accessing some bitmaps in an atomic manner using standard functions like
test_bit()/set_bit() etc etc.)

Regards,
Tigran

-
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/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:18 EST