]> Git Repo - linux.git/commit
mm: remove unnecessary use of atomic
authorPhil Carmody <[email protected]>
Wed, 26 May 2010 21:42:42 +0000 (14:42 -0700)
committerLinus Torvalds <[email protected]>
Thu, 27 May 2010 16:12:43 +0000 (09:12 -0700)
commit5407a56257b6ade44fd9bcac972c99845b7413cd
tree833a55856af25fe9be5e8a871d89f43677eac512
parentdf64f81bb1e01cbef967a96642dacf208acb7e72
mm: remove unnecessary use of atomic

The bottom 4 hunks are atomically changing memory to which there are no
aliases as it's freshly allocated, so there's no need to use atomic
operations.

The other hunks are just atomic_read and atomic_set, and do not involve
any read-modify-write.  The use of atomic_{read,set} doesn't prevent a
read/write or write/write race, so if a race were possible (I'm not saying
one is), then it would still be there even with atomic_set.

See:
http://digitalvampire.org/blog/index.php/2007/05/13/atomic-cargo-cults/

Signed-off-by: Phil Carmody <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c
This page took 0.051411 seconds and 4 git commands to generate.