At 13.43 09/12/00 +0100, Rasmus Andersen wrote:

>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.

and At 04.32 09/12/00 -0800, David S. Miller wrote:

>    Date:        Sat, 09 Dec 2000 11:25:09 +0100
>    From: Roberto Fichera <[EMAIL PROTECTED]>
>
>    Why we couldn't use atomic_inc(&mm->rss) here and below, avoiding to wrap
>    the inc with a spin_lock()/spin_unlock() ?
>
>atomic_t does not guarentee a large enough range necessary for mm->rss

If we haven't some atomic_t that can be negative we could define atomic_t 
as unsigned long for all arch,
this is sufficient to fitting all the range for the mm->rss.

Roberto Fichera.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to