lkml.org 
[lkml]   [2009]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] add isolate pages vmstat
On Thu, 16 Jul 2009, KOSAKI Motohiro wrote:

> Index: b/mm/migrate.c
> ===================================================================
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -67,6 +67,8 @@ int putback_lru_pages(struct list_head *
>
> list_for_each_entry_safe(page, page2, l, lru) {
> list_del(&page->lru);
> + dec_zone_page_state(page, NR_ISOLATED_ANON +
> + !!page_is_file_cache(page));
> putback_lru_page(page);
> count++;
> }

ok.

> @@ -696,6 +698,8 @@ unlock:
> * restored.
> */
> list_del(&page->lru);
> + dec_zone_page_state(page, NR_ISOLATED_ANON +
> + !!page_is_file_cache(page));
> putback_lru_page(page);
> }
>

ok.

> @@ -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()?


\
 
 \ /
  Last update: 2009-07-16 16:29    [W:0.173 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site