Re: Race in new page migration code?

Nick Piggin
2006-01-15T05:28:56Z

Christoph Lameter wrote:
> On Sat, 14 Jan 2006, Nick Piggin wrote:
>
>
>>>We take that reference count on the page:
>>
>>Yes, after you have dropped all your claims to pin this page
>>(ie. pte lock). You really can't take a refcount on a page that
>
>
> Oh. Now I see. I screwed that up by a fix I added.... We cannot drop the
> ptl here. So back to the way it was before. Remove the draining from
> isolate_lru_page and do it before scanning for pages so that we do not
> have to drop the ptl.
>

OK (either way is fine), but you should still drop the __isolate_lru_page
nonsense and revert it like my patch does.

> Also remove the WARN_ON since its now even possible that other actions of
> the VM move the pages into the LRU lists while we scan for pages to
> migrate.
>

Well, it has always been possible since vmscan started batching scans a
long time ago. Actually seeing as you only take a read lock on the semaphore
it is probably also possible to have a concurrent migrate operation cause
this as well.

Thanks,
Nick

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com