lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3] add isolate pages vmstat
Date
> > @@ -740,6 +744,13 @@ int migrate_pages(struct list_head *from
> > struct page *page2;
> > int swapwrite = current->flags & PF_SWAPWRITE;
> > int rc;
> > + int flags;
> > +
> > + local_irq_save(flags);
> > + list_for_each_entry(page, from, lru)
> > + __inc_zone_page_state(page, NR_ISOLATED_ANON +
> > + !!page_is_file_cache(page));
> > + local_irq_restore(flags);
> >
>
> Why do a separate pass over all the migrates pages? Can you add the
> _inc_xx somewhere after the page was isolated from the lru by calling
> try_to_unmap()?

calling try_to_unmap()? the pages are isolated before calling migrate_pages().
migrate_pages() have multiple caller. then I put this __inc_xx into top of
migrate_pages().





\
 
 \ /
  Last update: 2009-07-17 09:03    [from the cache]
©2003-2011 Jasper Spaans