]> git.baikalelectronics.ru Git - kernel.git/commit
mm, swap: Add infrastructure for saving page metadata on swap
authorKhalid Aziz <khalid.aziz@oracle.com>
Wed, 21 Feb 2018 17:15:44 +0000 (10:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Mar 2018 14:38:45 +0000 (07:38 -0700)
commita7c24d83b566df522555efb905c6b2ecf84ea84f
tree12b0ff1c2705daaeeeb7fd4d5a0be63d7098016f
parent97e9baa19eb134a004cdf4f07453b249db1e2b3c
mm, swap: Add infrastructure for saving page metadata on swap

If a processor supports special metadata for a page, for example ADI
version tags on SPARC M7, this metadata must be saved when the page is
swapped out. The same metadata must be restored when the page is swapped
back in. This patch adds two new architecture specific functions -
arch_do_swap_page() to be called when a page is swapped in, and
arch_unmap_one() to be called when a page is being unmapped for swap
out. These architecture hooks allow page metadata to be saved if the
architecture supports it.

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/asm-generic/pgtable.h
mm/memory.c
mm/rmap.c