lkml.org 
[lkml]   [2000]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm->rss is modified without page_table_lock held
    On Sat, Dec 09, 2000 at 11:25:09AM +0100, Roberto Fichera wrote:
    [...]
    > >+ spin_lock(&mm->page_table_lock);
    > > mm->rss++;
    > >+ spin_unlock(&mm->page_table_lock);
    > >
    >
    > [...snip...]
    >
    > Why we couldn't use atomic_inc(&mm->rss) here and below, avoiding to wrap
    > the inc with a spin_lock()/spin_unlock() ?
    >

    AFAIR, because for some architectures we can't rely on mm->rss fitting in
    an atomic_t. See davem's (somewhat short) post in this thread. Otherwise
    search the archives for the original thread treating this problem.
    --
    Rasmus(rasmus@jaquet.dk)

    Television is called a medium because it is neither rare nor well-done.
    -- Anonymous
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:52    [W:2.186 / U:0.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site