[lkml]   [2005]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH 3/6] swsusp: introduce the swap map structure and interface functions

    > This is the main part. It introduces a new data structure for the
    > swap-handling part of swsusp (the swap map structure, described in a comment)
    > and new functions for writing the image data to and reading them from swap.
    > It also introduces the interface functions allowing the snapshot-handling part
    > to communicate with the swap-handling part and modifies the struct pbe
    > structure (the swap_address member of it is no longer needed as the
    > swap-handling part uses its own independent data structures).

    One small comment. I miss "a" in "swap". Pretty please...

    > + * Rafael J. Wysocki <>
    > + * Added the swap map data structure and reworked the handling of swap
    > + *

    Feel free to add yourself to CREDITS, too. CREDITS are going to stay,
    but this does not really belong here, and may have to be moved
    somewhere else in future.

    > + * During resume we only need to use one swp_map_page structure
    > + * at a time, which means that we only need to use two memory pages for
    > + * reading the image - one for reading the swp_map_page structures
    > + * and the second for reading the data pages from swap.
    > */


    > +struct swp_map_page {
    > + swp_entry_t entries[MAP_PAGE_SIZE];
    > + swp_entry_t next_swp;
    > + struct swp_map_page *next;
    > +};
    > +
    > +typedef struct swp_map_page swp_map_t;

    Please don't. Just use "struct swap_map_page" instead.

    > +extern unsigned snapshot_pages_to_save(void);
    > +extern unsigned snapshot_image_pages(void);

    Make it "extern unsigned int". (That is in more than one place).

    > +int snapshot_recv_init(unsigned nr_pages, unsigned img_pages)

    Please, usefull words, that's receive_init and image_pages....

    Otherwise it looks good. I'll check it once more...

    Thanks, Sharp!
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-10-30 01:00    [W:0.020 / U:44.724 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site