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

Nitin Gupta nitingupta.mail at gmail.com
Sun Jul 2 03:23:09 EDT 2006


Hi Riel,

Rik van Riel wrote:
> On Sat, 1 Jul 2006, Asbjørn Sannes wrote:
> 
>> What should be considered here is how do we actually "migrate" a page
>> like this? Because this isn't done very often normally (how often do you
>> add/deactive swap areas) it is my understanding that this is an
>> expensive process, which is why we can't really do it, a proposal is to
>> instead of having a "vswap" area,
> 
> For systems that actually have a disk, it is probably best
> to implement compressed caching for swap cache pages.
> 
> Vswap is more useful for systems without swap, like the
> OLPC laptops...

Vswap is there only to support ccaching for swap cache pages. It has nothing to 
do for ccaching page cache pages. For page cache pages, page->index tells us 
where to hook in corres. mapping tree and for swap cache pages, swp_entry_t 
(obtained from scan_swap_map()) tells us where to hook in swapper space tree.

Vswap is a mechanism to maintain 'symmetry' of existing reclaim code for anon 
pages. That way I can reuse maximum of existing work :) I think, same thing can 
be used for systems with disk (provided they want ccaching). Its not just a 
workaround for cases where there's no swap disks.


So, ccaching work can be summarized as: pretend to write to disk (swap for anon, 
fs disk for page cache) when swapping out and pretend that page is in page/swap 
cache when lookup is performed.  All the work is in getting this 'asymmetry' 
working :)


Weekly work report to follow. :)


Cheers,
Nitin Gupta



More information about the linux-mm-cc mailing list