[linux-mm-cc] First experience of compressed cache

Nitin Gupta nitingupta910 at gmail.com
Tue Apr 1 04:59:02 EDT 2008


On Mon, Mar 31, 2008 at 5:59 PM,  <nai.xia at gmail.com> wrote:
>
<snip>

>    Oh, I mean the pages which are about to be swapped out to or swapped in
>    from real hard disk based swap ( maybe  I should say "swap cache" ? ).
>    Because I THINK ( I cannot proof it right now :)) some of the performance
>    loss in my initial experiment comes from the following (possible) case:
>    1. anonymous pages are evicted to ramzswap0 because of ram pressure.
>    2. ramzswap0 gets full but still ram pressure is high, so MM begins to push
>       pages to real hard disk swap.
>    3. When choosing which page to evict, from the point of the MM, the newly
>    compressed pages grasped by ramzswap0 are "young/new", so they are slow
>    to get out of the ram. While the fact is they may be the oldest pages, only
>    in a compressed form.
>    4. So many younger pages are pushed to real hard disk I/O directly
>       WITHOUT compressed, while the real old pages still stay in ram(ramzswap0).
>
>    And I can see another case where I/O is wasted if we do not touch the VM
>    itself:
>         When remove_mapping(), if the swap entry is in ramzswap0, and
>         unfortunately, the corresponding ramzswap0 page was swapped out to
>         real hard disk. If the VM have no idea of this "stacked" swapping,
>         then it will firstly swap it in from the hard disk and then remove
>         the ramzswap0 entry, instead of directly swap_free the hard disk entry.
>

Pages in compcache are no part of any LRU lists. So, they are "pinned" till
some other page is swapped to same swap slot.

- Nitin


More information about the linux-mm-cc mailing list