lkml.org 
[lkml]   [2005]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Lhms-devel] [PATCH 5/7] Direct Migration V5: remove_from_swap() to remove swap ptes

Christoph Lameter wrote:
> Add remove_from_swap
>
> remove_from_swap() allows the restoration of the pte entries that existed
> before page migration occurred for anonymous pages by walking the reverse
> maps. This reduces swap use and establishes regular pte's without the need
> for page faults.
>

in migrate_page_copy()
==
ClearPageSwapCache(page);
ClearPageActive(page);
ClearPagePrivate(page);
set_page_private(page, 0);
page->mapping = NULL;
==
page->mapping turns to be NULL, when migration success.
> + if (newpage) {
> /* Successful migration. Return new page to LRU */
> + remove_from_swap(page);
> move_to_lru(newpage);
> -
When success, remove_from_swap(page) is called.

> +#ifdef CONFIG_MIGRATION
> +/*
> + * Remove an anonymous page from swap replacing the swap pte's
> + * through real pte's pointing to valid pages.
> + */
> +void remove_from_swap(struct page *page)
> +{
> + struct anon_vma *anon_vma;
> + struct vm_area_struct *vma;
> +
> + if (!PageAnon(page))
> + return;
> +
PageAnon(page) always 0.

remove_from_swap(newpage) is sane ?

-- Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-30 12:35    [from the cache]
©2003-2011 Jasper Spaans