linux/arch/x86/mm
Andrea Arcangeli 8ee53820ed thp: mmu_notifier_test_young
For GRU and EPT, we need gup-fast to set referenced bit too (this is why
it's correct to return 0 when shadow_access_mask is zero, it requires
gup-fast to set the referenced bit).  qemu-kvm access already sets the
young bit in the pte if it isn't zero-copy, if it's zero copy or a shadow
paging EPT minor fault we relay on gup-fast to signal the page is in
use...

We also need to check the young bits on the secondary pagetables for NPT
and not nested shadow mmu as the data may never get accessed again by the
primary pte.

Without this closer accuracy, we'd have to remove the heuristic that
avoids collapsing hugepages in hugepage virtual regions that have not even
a single subpage in use.

->test_young is full backwards compatible with GRU and other usages that
don't have young bits in pagetables set by the hardware and that should
nuke the secondary mmu mappings when ->clear_flush_young runs just like
EPT does.

Removing the heuristic that checks the young bit in
khugepaged/collapse_huge_page completely isn't so bad either probably but
I thought it was worth it and this makes it reliable.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13 17:32:46 -08:00
..
kmemcheck x86: Eliminate bp argument from the stack tracing routines 2010-11-18 14:37:34 +01:00
Makefile x86, amd-nb: Complete the rename of AMD NB and related code 2010-11-18 15:53:04 +01:00
amdtopology_64.c Merge branch 'x86/apic-cleanups' into x86/numa 2010-12-29 11:36:26 -08:00
dump_pagetables.c x86, mm: Create symbolic index into address_markers array 2010-07-20 16:56:19 -07:00
extable.c
fault.c x86: access_error API cleanup 2010-10-26 16:52:09 -07:00
gup.c thp: mmu_notifier_test_young 2011-01-13 17:32:46 -08:00
highmem_32.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
hugetlbpage.c
init.c x86: Add NX protection for kernel data 2010-11-18 12:52:04 +01:00
init_32.c Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-01-13 10:15:12 -08:00
init_64.c x86: Resume trampoline must be executable 2010-11-22 14:38:52 +01:00
iomap_32.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
ioremap.c xen: Cope with unmapped pages when initializing kernel pagetable 2010-10-13 16:07:13 -07:00
kmmio.c x86, kmmio/mmiotrace: Fix double free of kmmio_fault_pages 2010-06-18 11:30:09 +02:00
memblock.c x86, memblock: Remove __memblock_x86_find_in_range_size() 2010-10-05 21:45:43 -07:00
memtest.c x86, memblock: Replace e820_/_early string with memblock_ 2010-08-27 11:13:47 -07:00
mmap.c
mmio-mod.c
numa.c x86/mm: Remove unused DBG() macro 2010-05-31 10:01:53 +02:00
numa_32.c x86-32, memblock: Make add_highpages honor early reserved ranges 2010-10-05 21:44:35 -07:00
numa_64.c x86, numa: Fix CONFIG_DEBUG_PER_CPU_MAPS without NUMA emulation 2011-01-07 14:09:34 +01:00
pageattr-test.c
pageattr.c x86: Add NX protection for kernel data 2010-11-18 12:52:04 +01:00
pat.c Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-06 10:17:52 -07:00
pat_internal.h x86, pat: Fix memory leak in free_memtype 2010-05-26 11:26:04 -07:00
pat_rbtree.c rbtree: Undo augmented trees performance damage and regression 2010-07-05 14:43:50 +02:00
pf_in.c x86,mmiotrace: Add support for tracing STOS instruction 2010-08-02 01:32:01 +02:00
pf_in.h
pgtable.c thp: add x86 32bit support 2011-01-13 17:32:44 -08:00
pgtable_32.c x86: remove last traces of quicklist usage 2010-05-24 13:33:31 -07:00
physaddr.c
physaddr.h
setup_nx.c x86, cpu: Only CPU features determine NX capabilities 2010-11-10 15:43:15 -08:00
srat_32.c x86, acpi: Parse all SRAT cpu entries even above the cpu number limitation 2010-12-23 13:16:18 -08:00
srat_64.c Merge branch 'x86/numa' into x86/urgent 2011-01-10 09:36:07 +01:00
testmmiotrace.c x86, kmmio/mmiotrace: Fix double free of kmmio_fault_pages 2010-06-18 11:30:09 +02:00
tlb.c x86: Use online node real index in calulate_tbl_offset() 2010-11-18 10:10:50 +01:00