Skip to content

Guest page hinting: cover sheet.

Martin Schwidefsky lkml virtualization 1 version In review

Get series with b4
b4 am 20060901110836.GA15684@skybase

Versions newest first

  1. v1 Latest9 patches 55 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Guest page hinting: unused / free pages.include/linux/mm.h include/linux/page-states.h mm/page_alloc.c+37 -015 replies
2/9Guest page hinting: unused / free pages on s390.arch/s390/Kconfig arch/s390/kernel/head64.S arch/s390/lib/uaccess.S +3 more+93 -120 replies
3/9Guest page hinting: volatile page cache.fs/buffer.c include/linux/mm.h include/linux/page-flags.h +10 more+471 -3328 replies
4/9Guest page hinting: volatile swap cache.include/linux/pagemap.h include/linux/swap.h mm/filemap.c +5 more+149 -225 replies
5/9Guest page hinting: mlocked pages.include/linux/fs.h mm/memory.c mm/mlock.c +2 more+43 -32 replies
6/9Guest page hinting: writable page table entries.fs/exec.c include/linux/page-flags.h include/linux/page-states.h +6 more+91 -50 replies
7/9Guest page hinting: minor fault optimization.include/linux/mm.h include/linux/pagemap.h include/linux/swap.h +6 more+120 -200 replies
8/9Guest page hinting: discarded page list.include/linux/page-states.h mm/page_alloc.c mm/vmscan.c+63 -03 replies
9/9Guest page hinting: full s390 support.arch/s390/Kconfig arch/s390/kernel/traps.c arch/s390/mm/fault.c +5 more+156 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/9] Guest page hinting: cover sheet.
Quoted 6 lines · Andrew Morton

The obvious question is: "can Xen/vmware/whatever use this too?". The preliminary answer I get back is "might well be the case". Hopefully we'll hear more back soon.

So a good way to get some monentum into this work is to copy [email protected] and lkml, try to get it some more users.

Hi folks,
Andrew thinks that it might be a good idea to broaden the audience for the guest page hinting patches. So here we go ..

The background for the patches is running a large number of guests on a paging hypervisor with a high memory over-commitment ratio. We have that situation on the mainframe running hundreds of Linux guests system on z/VM. For hypervisors with a small number of guests the usual answer to the memory over-commitment problem is a memory balloon in the guest whose size is controlled by the host. For are large number of guests the overhead to call into the guests increases, what is needed is an alternative way for the hypervisor to get to memory without the invokation of the guest system.

The original cover-sheet as posted on linux-mm:

Quoted 30 lines

Fourth version of the guest page hinting patches. The code has been polished and another race has been fixed (keep fingers crossed that is has been that last one this time).

The basic idea of guest page hinting is to give a host system which virtualizes the memory of its guest systems on a per page basis usage information for the guest pages. The host can then use this information to optimize the management of guest pages, in particular the paging. This optimizations can be used for unused (free) guest pages, for clean page cache pages, and for clean swap cache pages. The content of free pages can be replace with zeroes and the content of clean page cache / swap cache pages can be reloaded by the guest from the backing store.

There are 9 patches that implement guest page hinting:

1) Guest page state changes for free pages.
2) s390 exploitation of state changes for free pages.
3) Guest page state changes for page cache pages.
4) Guest page state changes for swap cache pages.
5) Keep mlocked pages in stable state.
6) Add support for writable page table entries.
7) Optimization for minor faults.
8) Discarded page list.
9) full s390 architecture support for guest page hinting.

The first two patches are independent from the other seven. These two just deal with unused/free vs. used/stable pages. The code starts to get interesting with patch #03..

Quoted 5 lines

Any objections against pushing patch #01 and patch #02 into the -mm tree?

The code runs well on s390 and does nothing for all other archs. Patches are against 2.6.18-rc4-mm2.

Only difference of this patch-set compare to the one posted on linux-mm is that this patch-set is against 2.6.18-rc5-mm1. To go back to Andrews
question: is this useful for anybody else in addition to s390?

Signature · 8 lines
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

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