lkml.org 
[lkml]   [2005]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC][patch 0/2] mm: remove PageReserved
    Date
    On Friday, 12 of August 2005 21:56, Daniel Phillips wrote:
    > On Thursday 11 August 2005 20:36, Rafael J. Wysocki wrote:
    > > > >> > Swsusp is the main "is valid ram" user I have in mind here. It
    > > > >> > wants to know whether or not it should save and restore the
    > > > >> > memory of a given `struct page`.
    > > > >>
    > > > >> Why can't it follow the rmap chain?
    > > > >
    > > > > It is walking physical memory, not memory managment chains. I need
    > > > > something like:
    > > >
    > > > Can you not use page_is_ram(pfn) ?
    > >
    > > IMHO it would be inefficient.
    > >
    > > There obviously are some non-RAM pages that should not be saved and there
    > > are some that are not worthy of saving, although they are RAM (eg because
    > > they never change), but this is very archtecture-dependent. The arch code
    > > should mark them as PageNosave for swsusp, and that's enough.
    >
    > I still don't see why you can't lift your flags up into the VMA. The rmap
    > mechanism is there precisely to let you get from the physical page to the
    > users and user data, including VMAs.

    I'm not sure if I understand the issue, but swsusp works on a different level.
    It only needs to figure out which physical pages, as represented by struct page
    objects, should be saved to swap before suspend. We browse all zones (once)
    and create a list of page frames that should be saved on the basis of the contents
    of the struct page objects alone. IMHO if we needed to use any additional
    mechanisms here, it would be less efficient than just checking the page flags.

    > I am also not sure why you are talking about efficiency here. Did you measure
    > the impact on suspend performance?

    I should have said "not enough". The problem is that there may be some page
    frames corresponding to RAM (eg such that page_is_ram(pfn) is non-zero) which
    for some reason should not be saved on given architecture and we need a
    mechanism allowing us to identify them.

    Greets,
    Rafael


    --
    - Would you tell me, please, which way I ought to go from here?
    - That depends a good deal on where you want to get to.
    -- Lewis Carroll "Alice's Adventures in Wonderland"
    -
    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-08-13 00:17    [W:4.352 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site