[linux-mm-cc] Weekly work summary [7/12]

Nitin Gupta nitingupta.mail at gmail.com
Tue Jul 18 09:44:47 EDT 2006


Hi Anderson,

Sorry, I got totally confused by what you are trying to say :)

You can take the approach this way: had there been no vswap, you would 
have to replace radix nodes for swapper_space tree for whatever real 
swap there is. But in case there's no real swap, you still need this 
swapper space tree -- that's what vswap is all about -- have this 
swapper_space tree always with you so you can replace its node with 
chunk_head.

When storing page (swap=out), simple replace corres. swapper_space entry 
with a chunk_head and make it point to first chunk and take more chunks 
as reqd from free list (maybe expanding free list if reqd) and link 
together all these chunks.

When looking up page (as in e.g. find_get_page) you know it's chunk_head 
by looking PG_compressed flag. In this case chunk_head contains ptr to 
first chunk and chunks are linked. That way you can collect all chunks 
in a single page, decompress it and return from lookup function (e.g. 
find_get_page) with this newly decompressed page.

Hope this makes it clear :)

Cheers,
Nitin Gupta


Anderson Briglia wrote:
> Vswap simulates a real swap area, right? I still have a doubt: If I
> have a compressed page spreaded in some chunks, this page should be
> regrouped to go to a swap area (real or virtual), and the page can be
> stored at compressed form or not. How about vswap? AFAIK, vswap is
> used just for anon pages (until now), but the pages are transfered
> in/out vswap using the same swap mechanism (shrink_list() and
> pageout()). What I'm not understanding is how vswap will act as a
> ccache if the chunks will not use the vswap, just regrouped compressed
> pages. I thought that the chunk lists (free and used) are the
> compressed cache because the pages will be stored there before going
> to a swap area (real or virtual), is this right?
>
> Sorry if I'm a little bit confusing, but I'm trying to understand your
> approach. :)
>
> Best regards,
>
> Anderson Briglia
>



More information about the linux-mm-cc mailing list