Skip to content

RFC guest page hinting version 5

Martin Schwidefsky linux-mm lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 2 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+638 -342 replies
2/6Guest page hinting: volatile swap cache.include/linux/pagemap.h include/linux/swap.h mm/filemap.c +6 more+154 -210 replies
3/6Guest page hinting: mlocked pages.include/linux/fs.h mm/memory.c mm/mlock.c +2 more+30 -50 replies
4/6Guest page hinting: writable page table entries.fs/exec.c include/linux/page-flags.h include/linux/page-states.h +6 more+104 -60 replies
5/6Guest page hinting: minor fault optimization.include/linux/pagemap.h include/linux/swap.h mm/filemap.c +5 more+18 -100 replies
6/6Guest page hinting: s390 support.arch/s390/Kconfig arch/s390/kernel/head64.S arch/s390/kernel/time.c +7 more+362 -70 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/6] [rfc] guest page hinting version 5

After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added:
- Avoid page_host_discards() calls outside of page-states.h
- The discard list is now implemented via the page_free_discarded hook and architecture specific code.
- PG_state_change page flag has been replaced with architecture specficic primitives. s390 now uses PG_arch_1 and avoids to waste another page flag (it still uses two additional bits).
- Add calls to make pages volatile when pages are moved from the active to the inactive list and set max_buffer_heads to zero to force a try_to_release_page call to get more page into volatile state.
- remap_file_pages now works with guest page hinting, although the discard of a page contained in a non-linear mapping is slow.
- Simplified the check in the mlock code.
- In general the code looks a bit nicer now.

I tried to implement batched state transitions to volatile but after a few failures I gave up. Basically, most pages are made volatile with the unlock_page call after the end of i/o. To postpone a make volatile attempt requires to take a page reference. Trouble is you can't release a page reference from interrupt context. This has to be done in task context, so we can't use a pvec/array for keep the references. There is no room in struct page for a list, so it turns out lazy make volatile is hard to implement.

The patches apply on the current git tree.

Many thanks go to Oliver Paukstadt who kept me busy with bug reports and uncountable dumps ..

Signature · 4 lines
blue skies,
  Martin.

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