[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060801204202.GA223@oleg>
Date: Wed, 2 Aug 2006 00:42:02 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Dave Kleikamp <shaggy@...tin.ibm.com>
Cc: Nick Piggin <npiggin@...e.de>, Hugh Dickins <hugh@...itas.com>,
Andrew Morton <akpm@...l.org>,
Andy Whitcroft <apw@...dowen.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch 1/2] mm: speculative get_page
On 08/01, Dave Kleikamp wrote:
>
> On Tue, 2006-08-01 at 23:32 +0400, Oleg Nesterov wrote:
> > Nick Piggin wrote:
> > >
> > > --- linux-2.6.orig/mm/vmscan.c
> > > +++ linux-2.6/mm/vmscan.c
> > > @@ -380,6 +380,8 @@ int remove_mapping(struct address_space
> > > if (!mapping)
> > > return 0; /* truncate got there first */
> > >
> > > + SetPageNoNewRefs(page);
> > > + smp_wmb();
> > > write_lock_irq(&mapping->tree_lock);
> > >
> >
> > Is it enough?
> >
> > PG_nonewrefs could be already set by another add_to_page_cache()/remove_mapping(),
> > and it will be cleared when we take ->tree_lock.
>
> Isn't the page locked when calling remove_mapping()? It looks like
> SetPageNoNewRefs & ClearPageNoNewRefs are called in safe places. Either
> the page is locked, or it's newly allocated. I could have missed
> something, though.
No, I think it is I who missed something, thanks.
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists