On Thursday 25 October 2007 11:14, Andrew Morton wrote:Hmm, I might just withdraw this patch 1/5. This is generally a slowpath, and it's hard to guarantee that any exported user doesn't rely on the full barrier here (not that they would know whether they do or not, let alone document the fact). I think all the others are pretty clear, though? (read on if no) If you set a bit for the purpose of opening a critical section, then you can use this. And clear_bit_unlock to close it. The advantages are that it is faster, and the hapless driver writer doesn't have to butcher or forget about doing the correct smp_mb__before_clear_bit(), or have reviewers wondering exactly WTF that barrier is for, etc. Basically, it is faster, harder to get wrong, and more self-docuemnting. In general, others should not emulate it, because they should be using our regular locking primitives instead. If they really must roll their own, then using these would be nice, IMO. 2/5: "tasklet_trylock opens a critical section. tasklet_unlock closes it. hence, _lock bitops can be used for the bitops" 5/5: "trylock_page opens a critical section. unlock_page closes it. hence, _lock bitops can be used for the bitops" 5/5: "trylock_buffer opens a critical section. unlock_buffer closes it. hence, _lock bitops can be used for the bitops" Are those helpful? -
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Justin Piszcz | exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Radu Rendec | htb parallelism on multi-core platforms |
