Messages in this thread | | | Date | Wed, 30 Nov 2005 20:29:38 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [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/
| |