Martin Schwidefsky
abf09bed3c
s390/mm: implement software dirty bits
...
The s390 architecture is unique in respect to dirty page detection,
it uses the change bit in the per-page storage key to track page
modifications. All other architectures track dirty bits by means
of page table entries. This property of s390 has caused numerous
problems in the past, e.g. see git commit ef5d437f71
"mm: fix XFS oops due to dirty pages without buffers on s390".
To avoid future issues in regard to per-page dirty bits convert
s390 to a fault based software dirty bit detection mechanism. All
user page table entries which are marked as clean will be hardware
read-only, even if the pte is supposed to be writable. A write by
the user process will trigger a protection fault which will cause
the user pte to be marked as dirty and the hardware read-only bit
is removed.
With this change the dirty bit in the storage key is irrelevant
for Linux as a host, but the storage key is still required for
KVM guests. The effect is that page_test_and_clear_dirty and the
related code can be removed. The referenced bit in the storage
key is still used by the page_test_and_clear_young primitive to
provide page age information.
For page cache pages of mappings with mapping_cap_account_dirty
there will not be any change in behavior as the dirty bit tracking
already uses read-only ptes to control the amount of dirty pages.
Only for swap cache pages and pages of mappings without
mapping_cap_account_dirty there can be additional protection faults.
To avoid an excessive number of additional faults the mk_pte
primitive checks for PageDirty if the pgprot value allows for writes
and pre-dirties the pte. That avoids all additional faults for
tmpfs and shmem pages until these pages are added to the swap cache.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-14 15:55:23 +01:00
..
bitops
Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
2012-10-14 13:39:34 -07:00
4level-fixup.h
atomic-long.h
atomic.h
Remove all #inclusions of asm/system.h
2012-03-28 18:30:03 +01:00
atomic64.h
audit_change_attr.h
audit: support the "standard" <asm-generic/unistd.h>
2011-05-04 14:41:28 -04:00
audit_dir_write.h
audit: support the "standard" <asm-generic/unistd.h>
2011-05-04 14:41:28 -04:00
audit_read.h
audit: support the "standard" <asm-generic/unistd.h>
2011-05-04 14:41:28 -04:00
audit_signal.h
audit_write.h
audit: support the "standard" <asm-generic/unistd.h>
2011-05-04 14:41:28 -04:00
barrier.h
Create asm-generic/barrier.h
2012-03-28 18:30:03 +01:00
bitops.h
bitsperlong.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
bug.h
bug.h: Fix up CONFIG_BUG=n implicit function declarations.
2012-06-25 10:32:49 -07:00
bugs.h
cache.h
cacheflush.h
asm-generic/cacheflush.h: flush icache when copying to user pages
2011-05-25 08:39:37 -07:00
checksum.h
Add extra arch overrides to asm-generic/checksum.h
2011-11-01 07:34:21 -07:00
clkdev.h
asm-generic: Add default clkdev.h
2012-10-03 21:33:53 +02:00
cmpxchg-local.h
cmpxchg.h
asm-generic: add linux/types.h to cmpxchg.h
2012-04-02 14:41:27 -07:00
cputime.h
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2012-01-06 08:44:54 -08:00
current.h
delay.h
asm-generic: delay.h fix udelay and ndelay for 8 bit args
2011-07-22 18:45:33 +02:00
device.h
div64.h
dma-coherent.h
common: dma-mapping: add support for generic dma_mmap_* calls
2012-07-30 12:25:46 +02:00
dma-contiguous.h
mm: cma: fix condition check when setting global cma area
2012-07-06 12:02:04 +02:00
dma-mapping-broken.h
asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
2012-12-25 20:14:54 +01:00
dma-mapping-common.h
common: dma-mapping: introduce dma_get_sgtable() function
2012-07-30 12:25:46 +02:00
dma.h
emergency-restart.h
exec.h
Split arch_align_stack() out from asm-generic/system.h
2012-03-28 18:30:03 +01:00
fb.h
ftrace.h
futex.h
getorder.h
bitops: Add missing parentheses to new get_order macro
2012-02-24 10:39:27 -08:00
gpio.h
GPIO follow up patch and type change for v3.5 merge window
2012-12-11 13:00:56 -08:00
hardirq.h
hw_irq.h
ide_iops.h
int-l64.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
int-ll64.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
io-64-nonatomic-hi-lo.h
asm-generic: architecture independent readq/writeq for 32bit environment
2012-02-21 16:47:28 -08:00
io-64-nonatomic-lo-hi.h
asm-generic: architecture independent readq/writeq for 32bit environment
2012-02-21 16:47:28 -08:00
io.h
asm-generic/io.h: convert readX defines to functions
2013-02-14 15:55:00 +01:00
ioctl.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
iomap.h
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-02-27 09:43:30 -06:00
irq.h
irq_regs.h
irqflags.h
Kbuild.asm
UAPI: Set up uapi/asm/Kbuild.asm
2012-10-02 18:01:56 +01:00
kdebug.h
kmap_types.h
asm-generic: remove km_type definitions
2012-07-24 15:27:30 +08:00
kvm_para.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
libata-portmap.h
linkage.h
local.h
atomic: use <linux/atomic.h>
2011-07-26 16:49:47 -07:00
local64.h
atomic: use <linux/atomic.h>
2011-07-26 16:49:47 -07:00
memory_model.h
mm: fix __page_to_pfn for a const struct page argument
2011-08-17 13:00:20 -07:00
mm_hooks.h
mmu.h
asm-generic/mmu.h: Add support for FDPIC
2012-12-09 23:14:14 +01:00
mmu_context.h
module.h
Make most arch asm/module.h files use asm-generic/module.h
2012-09-28 14:31:03 +09:30
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex: Place lock in contended state after fastpath_lock failure
2012-08-13 18:46:54 +02:00
mutex.h
page.h
The following changes since commit 3ee72ca992
2012-01-10 17:39:40 -08:00
param.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
parport.h
include: remove __dev* attributes.
2013-01-03 15:57:16 -08:00
pci-bridge.h
PCI: work around Stratus ftServer broken PCIe hierarchy
2012-04-30 15:21:02 -06:00
pci-dma-compat.h
pci.h
PCI: collapse pcibios_resource_to_bus
2012-02-23 20:19:04 -07:00
pci_iomap.h
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-02-27 09:43:30 -06:00
percpu.h
pgalloc.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h
s390/mm: implement software dirty bits
2013-02-14 15:55:23 +01:00
ptrace.h
asm-generic/ptrace.h: start a common low level ptrace helper
2011-05-26 17:12:36 -07:00
resource.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
rtc.h
rwsem.h
Hexagon: Add locking types and functions
2011-11-01 07:34:20 -07:00
scatterlist.h
sections.h
segment.h
serial.h
siginfo.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
signal.h
unify default ptrace_signal_deliver
2012-11-29 00:01:23 -05:00
sizes.h
ARM: 7430/1: sizes.h: move from asm-generic to <linux/sizes.h>
2012-06-28 17:14:34 +01:00
spinlock.h
statfs.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
string.h
switch_to.h
Split the switch_to() wrapper out of asm-generic/system.h
2012-03-28 18:30:03 +01:00
syscall.h
asm/syscall.h: add syscall_get_arch
2012-04-14 11:13:19 +10:00
syscalls.h
CONFIG_GENERIC_SIGALTSTACK build breakage with asm-generic/syscalls.h
2012-12-26 01:15:01 -05:00
termios-base.h
termios.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
timex.h
tlb.h
mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT
2013-01-04 16:11:46 -08:00
tlbflush.h
BUG: headers with BUG/BUG_ON etc. need linux/bug.h
2012-03-04 17:54:34 -05:00
topology.h
trace_clock.h
tracing,x86: Add a TSC trace_clock
2012-11-13 15:48:27 -05:00
uaccess-unaligned.h
uaccess.h
fix default __strnlen_user macro
2011-10-06 19:47:12 -04:00
unaligned.h
unistd.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
user.h
vga.h
vmlinux.lds.h
vmlinux.lds.h: Allow architectures to add sections to the front of .bss
2012-10-11 11:02:37 +02:00
word-at-a-time.h
word-at-a-time: make the interfaces truly generic
2012-05-26 11:33:40 -07:00
xor.h
asm-generic: xor: mark static functions as __maybe_unused
2012-10-03 21:21:06 +02:00