]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - mm/rmap.c
mm: add support for discard of unused ptes
authorKonstantin Weitz <konstantin.weitz@gmail.com>
Wed, 17 Apr 2013 11:59:32 +0000 (13:59 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 21 Feb 2014 07:50:18 +0000 (08:50 +0100)
commit45961722f8e30ceab9d135b1ddc0947d53aef7c3
treecfc391e0bcb2958625565ebbc480fe11ef95bcaf
parent53e857f30867918b3618d8e18902e63291946ef4
mm: add support for discard of unused ptes

In a virtualized environment and given an appropriate interface the guest
can mark pages as unused while they are free (for the s390 implementation
see git commit 45e576b1c3d00206 "guest page hinting light"). For the host
the unused state is a property of the pte.

This patch adds the primitive 'pte_unused' and code to the host swap out
handler so that pages marked as unused by all mappers are not swapped out
but discarded instead, thus saving one IO for swap out and potentially
another one for swap in.

[ Martin Schwidefsky: patch reordering and simplification ]

Signed-off-by: Konstantin Weitz <konstantin.weitz@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/asm-generic/pgtable.h
mm/rmap.c