freebsd-nq/sys/vm
Alan Cox 5730afc9b6 Handle spurious page faults that may occur in no-fault sections of the
kernel.

When access restrictions are added to a page table entry, we flush the
corresponding virtual address mapping from the TLB.  In contrast, when
access restrictions are removed from a page table entry, we do not
flush the virtual address mapping from the TLB.  This is exactly as
recommended in AMD's documentation.  In effect, when access
restrictions are removed from a page table entry, AMD's MMUs will
transparently refresh a stale TLB entry.  In short, this saves us from
having to perform potentially costly TLB flushes.  In contrast,
Intel's MMUs are allowed to generate a spurious page fault based upon
the stale TLB entry.  Usually, such spurious page faults are handled
by vm_fault() without incident.  However, when we are executing
no-fault sections of the kernel, we are not allowed to execute
vm_fault().  This change introduces special-case handling for spurious
page faults that occur in no-fault sections of the kernel.

In collaboration with:	kib
Tested by:		gibbs (an earlier version)

I would also like to acknowledge Hiroki Sato's assistance in
diagnosing this problem.

MFC after:	1 week
2012-03-22 04:52:51 +00:00
..
default_pager.c
device_pager.c
memguard.c
memguard.h
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c
swap_pager.c Remove direct access to si_name. 2012-02-10 12:35:57 +00:00
swap_pager.h
uma_core.c exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 2012-01-27 20:18:31 +00:00
uma_dbg.c
uma_dbg.h
uma_int.h
uma.h exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 2012-01-27 20:18:31 +00:00
vm_contig.c In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag 2012-03-17 23:00:32 +00:00
vm_extern.h
vm_fault.c Handle spurious page faults that may occur in no-fault sections of the 2012-03-22 04:52:51 +00:00
vm_glue.c
vm_init.c
vm_kern.c Simplify kmem_alloc() by eliminating code that existed on account of 2012-02-29 05:41:29 +00:00
vm_kern.h
vm_map.c Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger 2012-03-19 18:47:34 +00:00
vm_map.h Account the writeable shared mappings backed by file in the vnode 2012-02-23 21:07:16 +00:00
vm_meter.c
vm_mmap.c In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag 2012-03-17 23:00:32 +00:00
vm_object.c Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger 2012-03-19 18:47:34 +00:00
vm_object.h Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger 2012-03-19 18:47:34 +00:00
vm_page.c exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 2012-01-27 20:18:31 +00:00
vm_page.h exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 2012-01-27 20:18:31 +00:00
vm_pageout.c In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag 2012-03-17 23:00:32 +00:00
vm_pageout.h In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag 2012-03-17 23:00:32 +00:00
vm_pager.c
vm_pager.h
vm_param.h
vm_phys.c Bah, just revert my earlier change entirely. (Missed alc's request to do 2012-03-19 19:06:40 +00:00
vm_phys.h
vm_reserv.c
vm_reserv.h
vm_unix.c
vm_zeroidle.c
vm.h
vnode_pager.c Add KTR_VFS traces to track modifications to a vnode's writecount. 2012-03-08 20:27:20 +00:00
vnode_pager.h Account the writeable shared mappings backed by file in the vnode 2012-02-23 21:07:16 +00:00