diff options
author | Phil Carmody <ext-phil.2.carmody@nokia.com> | 2010-05-26 14:42:42 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 09:12:43 -0700 |
commit | 5407a56257b6ade44fd9bcac972c99845b7413cd (patch) | |
tree | 833a55856af25fe9be5e8a871d89f43677eac512 /mm/migrate.c | |
parent | memcg: make oom killer a no-op when no killable task can be found (diff) | |
download | linux-dev-5407a56257b6ade44fd9bcac972c99845b7413cd.tar.xz linux-dev-5407a56257b6ade44fd9bcac972c99845b7413cd.zip |
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 <ext-phil.2.carmody@nokia.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
0 files changed, 0 insertions, 0 deletions