Skip to content

Guest page hinting version 7.

Martin Schwidefsky linux-mm lkml virtualization xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 45 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Guest page hinting: core + volatile page cache.fs/buffer.c include/linux/mm.h include/linux/page-flags.h +11 more+656 -363 replies
2/6Guest page hinting: volatile swap cache.include/linux/pagemap.h include/linux/swap.h mm/filemap.c +5 more+176 -182 replies
3/6Guest page hinting: mlocked pages.include/linux/fs.h mm/memory.c mm/mlock.c +2 more+33 -52 replies
4/6Guest page hinting: writable page table entries.include/linux/page-flags.h include/linux/page-states.h mm/memory.c +3 more+98 -33 replies
5/6Guest page hinting: minor fault optimization.include/linux/pagemap.h include/linux/swap.h mm/filemap.c +5 more+42 -111 reply
6/6Guest page hinting: s390 support.arch/s390/Kconfig arch/s390/include/asm/page-states.h arch/s390/include/asm/page.h +9 more+346 -571 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchRik van Riel
1/6A-b
2/6A-b
3/6A-b
4/6A-b
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 0/6] Guest page hinting version 7.

Greetings,
the circus is back in town -- another version of the guest page hinting patches. The patches differ from version 6 only in the kernel version, they apply against 2.6.29. My short sniff test showed that the code is still working as expected.

To recap (you can skip this if you read the boiler plate of the last version of the patches):
The main benefit for guest page hinting vs. the ballooner is that there is no need for a monitor that keeps track of the memory usage of all the guests, a complex algorithm that calculates the working set sizes and for the calls into the guest kernel to control the size of the balloons. The host just does normal LRU based paging. If the host picks one of the pages the guest can recreate, the host can throw it away instead of writing it to the paging device. Simple and elegant.
The main disadvantage is the added complexity that is introduced to the guests memory management code to do the page state changes and to deal with discard faults.

Right after booting the page states on my 256 MB z/VM guest looked like this (r=resident, p=preserved, z=zero, S=stable, U=unused, P=potentially volatile, V=volatile):

<state>|--tot--|---r---|---p---|---z---|
    S  |  19719|  19673|      0|     46|
    U  | 235416|   2734|      0| 232682|
    P  |      1|      1|      0|      0|
    V  |   7008|   7008|      0|      0|
tot->  | 262144|  29416|      0| 232728|

about 25% of the pages are in voltile state. After grepping through the linux source tree this picture changes:

<state>|--tot--|---r---|---p---|---z---|
    S  |  43784|  43744|      0|     40|
    U  |  78631|   2397|      0|  76234|
    P  |      2|      2|      0|      0|
    V  | 139727| 139727|      0|      0|
tot->  | 262144| 185870|      0|  76274|

about 75% of the pages are now volatile. Depending on the workload you will get different results.

Signature · 10 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>