[linux-mm-cc] Re: [lc-devel] Chunk list issues

Nitin Gupta nitingupta.mail at gmail.com
Wed Jun 28 11:39:29 EDT 2006


Hi Anderson,

On 6/28/06, Anderson Briglia <briglia.anderson at gmail.com> wrote:
> > > I have a doubt related to chunk operations:
> > >
> > > - I guess you will use the virtual swap as the compressed cache for
> > > anon pages, right? If yes, how will you swapin/swapout chunks? If a
> > > single chunk points to a portion of a physical page, and the
> > > swapin/swapout operations handle entire pages of data.
> >
> > Yes, vswap is for anon pages. I think you are mistaken somewhere...I'm not using
> > bio structs or anything to swapin/out pages from vswap.
>
> Ok. Will be possible to transfer pages from vswap to a 'real' swap area?
>

Yes, but 'procedure' will be same as for transferring a page from a
swap to any other swap: change it swp_entry_t to have 'type' for other
swap and it will get written to this second swap.

Or, if you want to know if we can fall back to real swap if vswap is
full, then also yes, it is already being done (please see git tree).

> > So, for swap out: Get enough free chunks from free list and store compressed
> > page in them.
>
> And the free chunks will point to pages inserted into the vswap memory
> area? So, all chunks are allocated using the vswap area?

Pages will be compressed, spread out in chunks, a chunk_head will
point to first of these chunks. This chunk_head ptr is stored in radix
node corres. to page being compressed.
There is no such thing as 'vswap area' or maybe I didn't understand your ques :)

Cheers,
Nitin Gupta


More information about the linux-mm-cc mailing list