[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-smp
Subject:    Shared memory consistency in Linux
From:       "Andrew Perepechko" <murrych () yandex ! ru>
Date:       2004-11-22 18:05:37
Message-ID: 41A22A71.000001.28788 () camay ! yandex ! ru
[Download RAW message or body]

Is there some simple rule that can help in exploring if some kernel routine provides \
read or write barrier (or both)?

I can see in the kernel source that it is correct to omit explicit memory barrier in \
the following example:

code A:

event = 1;
mb(); // Unnecessary
wake_up(wq);

code B:

wait_event(&wq, event == 1);


This feature (write barrier presence in wake_up) is not documented in the kernel \
code, can it get changed in the future? 

Which kernel routines (except this one) provide memory barriers (and will provide in \
the future), especially locking routines? 

I've read "Unreliable Guide to Locking" by R.Russell, but i'd like some reliable (and \
                more complete) guide.
-
To unsubscribe from this list: send the line "unsubscribe linux-smp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic