lkml.org 
[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 03/19] define page_file_cache() function
    On Tue, 8 Jan 2008, Rik van Riel wrote:

    > Define page_file_cache() function to answer the question:
    > is page backed by a file?

    > +static inline int page_file_cache(struct page *page)
    > +{
    > + if (PageSwapBacked(page))
    > + return 0;

    Could we call this PageNotFileBacked or so? PageSwapBacked is true for
    pages that are RAM based. Its a bit confusing.

    > Index: linux-2.6.24-rc6-mm1/mm/migrate.c
    > ===================================================================
    > --- linux-2.6.24-rc6-mm1.orig/mm/migrate.c 2008-01-02 12:37:14.000000000 -0500
    > +++ linux-2.6.24-rc6-mm1/mm/migrate.c 2008-01-02 12:37:22.000000000 -0500
    > @@ -546,6 +546,8 @@ static int move_to_new_page(struct page
    > /* Prepare mapping for the new page.*/
    > newpage->index = page->index;
    > newpage->mapping = page->mapping;
    > + if (PageSwapBacked(page))
    > + SetPageSwapBacked(newpage);
    >
    > mapping = page_mapping(page);
    > if (!mapping)

    That hunk belongs into migrate_page_copy()? Or is there a reason that we
    need this flag that early?


    \
     
     \ /
      Last update: 2008-01-08 23:23    [W:8.099 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site