lkml.org 
[lkml]   [2010]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm: remove unnecessary use of atomic
On Wed,  5 May 2010 14:21:48 +0300
Phil Carmody <ext-phil.2.carmody@nokia.com> wrote:

> From: Phil Carmody <ext-phil.2.carmody@nokia.com>
>
> 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>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>



\
 
 \ /
  Last update: 2010-05-06 08:25    [W:0.237 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site