Re: [Lhms-devel] [PATCH 5/7] Direct Migration V5: remove_from_swap() to remove swap ptes

From: KAMEZAWA Hiroyuki (kamezawa.hiroyu_at_jp.fujitsu.com)
Date: 11/30/05

  • Next message: Jörn Engel: "Re: [2.6 patch] i386: always use 4k stacks"
    Date:	Wed, 30 Nov 2005 20:29:38 +0900
    To: Christoph Lameter <clameter@sgi.com>
    
    

    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/


  • Next message: Jörn Engel: "Re: [2.6 patch] i386: always use 4k stacks"

    Relevant Pages

    • Re: Orinoco card fails on resume with 2.6.2 (race condition?)
      ... strange timer state, but I dunno. ... the system goes into a swap ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • MM patches (was Re: why swap at all?)
      ... A bit of swap out, ... main ones that applie here is my split active lists patch (search ... hitting memory pressure. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Andrea VM changes
      ... and it was a surprise memory hog due to the usual GCC surprises. ... The obvious answer is to turn off swap, but I like to have some swap ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: why swap at all?
      ... If one has 16GB of ram, would he or she want to use swap? ... Real Programmers consider "what you see is what you get" to be just as ... Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kswapd in tight loop 2.6.9-rc3-bk-recent
      ... The kswapd1 process was pegging the cpu at 99% ... and 2GB of swap. ... there was a bunch of RAM sitting free too (about half a gig if memory ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)