freebsd-nq/sys/kern
Mark Johnston 64910ddbff Launder VPO_NOSYNC pages upon vnode deactivation.
As of r234483, vnode deactivation causes non-VPO_NOSYNC pages to be
laundered. This behaviour has two problems:

1. Dirty VPO_NOSYNC pages must be laundered before the vnode can be
   reclaimed, and this work may be unfairly deferred to the vnlru process
   or an unrelated application when the system is under vnode pressure.
2. Deactivation of a vnode with dirty VPO_NOSYNC pages requires a scan of
   the corresponding VM object's memq for non-VPO_NOSYNC dirty pages; if
   the laundry thread needs to launder pages from an unreferenced such
   vnode, it will reactivate and deactivate the vnode with each laundering,
   potentially resulting in a large number of expensive scans.

Therefore, ensure that all dirty pages are laundered upon deactivation,
i.e., when all maps of the vnode are removed and all references are
released.

Reviewed by:	alc, kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D8641
2016-11-26 21:00:27 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_binmisc.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Style. 2016-10-04 15:23:03 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c ANSIfy inflate.c 2016-10-04 17:57:30 +00:00
init_main.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c Initialize 'ticks' earlier in boot after 'hz' is set. 2016-11-22 01:02:59 +00:00
kern_clocksource.c
kern_condvar.c
kern_conf.c
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
kern_descrip.c Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
kern_dtrace.c
kern_dump.c
kern_environment.c
kern_et.c
kern_event.c
kern_exec.c Remove most of the code for implementing PG_CACHED pages. (This change does 2016-11-15 18:22:50 +00:00
kern_exit.c wait: avoid relocking the child if proc_to_reap returns 1 2016-11-24 18:21:48 +00:00
kern_fail.c
kern_ffclock.c
kern_fork.c
kern_gzio.c
kern_hhook.c
kern_idle.c
kern_intr.c
kern_jail.c
kern_khelp.c
kern_kthread.c
kern_ktr.c
kern_ktrace.c
kern_linker.c kern_linker: Handle module-loading failures in preloaded .ko files 2016-10-13 02:06:23 +00:00
kern_lock.c
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c
kern_mbuf.c
kern_mib.c Mark a bunch of mpsafe sysctls as such. 2016-10-19 19:42:01 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c Make no assertions about mutex state when the scheduler is stopped. 2016-09-26 15:30:30 +00:00
kern_ntptime.c
kern_numa.c
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c
kern_procctl.c Add the foundation copyrights to procctl kernel sources. 2016-09-23 12:32:20 +00:00
kern_prot.c
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c
kern_rmlock.c
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sendfile.c Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't 2016-11-17 21:36:18 +00:00
kern_sharedpage.c
kern_shutdown.c
kern_sig.c
kern_switch.c
kern_sx.c
kern_synch.c Remove remnants of the recursive sleep support. Instead assert that 2016-11-02 20:57:20 +00:00
kern_syscalls.c
kern_sysctl.c
kern_tc.c
kern_thr.c
kern_thread.c
kern_time.c
kern_timeout.c Permit timed sleeps for threads other than thread0 before timers are working. 2016-11-25 18:02:43 +00:00
kern_umtx.c [mips] make UMTX_CHAINS configurable at compile time. 2016-11-15 01:34:38 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c
link_elf.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh makesyscalls.sh: remove trailing space on the "created from" line 2016-10-17 13:52:24 +00:00
md4c.c
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c Allow scheduling during early boot. 2016-11-12 00:23:09 +00:00
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus_dma.c
subr_bus.c Add two new ddb commands: show device/show all devices 2016-11-13 00:46:11 +00:00
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_counter.c
subr_devmap.c
subr_devstat.c
subr_disk.c
subr_dummy_vdso_tc.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
subr_gtaskqueue.c Resolve whitespace diff to NextBSD. 2016-10-19 21:01:24 +00:00
subr_hash.c
subr_hints.c
subr_intr.c INTRNG - fix MSI/MSIX release path 2016-10-11 17:00:29 +00:00
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Initialize 'ticks' earlier in boot after 'hz' is set. 2016-11-22 01:02:59 +00:00
subr_pcpu.c
subr_pctrie.c
subr_power.c
subr_prf.c Include <stdarg.h> instead of <machine/stdarg.h> when compiled as 2016-10-24 18:03:04 +00:00
subr_prof.c
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c Permit timed sleeps for threads other than thread0 before timers are working. 2016-11-25 18:02:43 +00:00
subr_smp.c Handle broadcast NMIs. 2016-10-24 16:40:27 +00:00
subr_stack.c
subr_syscall.c
subr_taskqueue.c While draining a timeout task prevent the taskqueue_enqueue_timeout() 2016-09-29 10:38:20 +00:00
subr_terminal.c
subr_trap.c
subr_turnstile.c ddb(4): Add sleepchains to "show allchains" 2016-10-22 18:02:20 +00:00
subr_uio.c In the fueword64(9) wrapper for architectures which do not implemented 2016-10-23 11:23:17 +00:00
subr_unit.c
subr_vmem.c
subr_witness.c Fix WITNESS hints for pagequeue locks. 2016-10-29 20:01:48 +00:00
sys_capability.c capsicum: perform copyout without the fildesc lock held in sys_cap_ioctls_get 2016-10-21 16:12:23 +00:00
sys_generic.c
sys_pipe.c
sys_procdesc.c
sys_process.c
sys_socket.c
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c
uipc_accf.c Use correct size type in do_setopt_accept_filter 2016-10-12 00:56:49 +00:00
uipc_debug.c
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
uipc_mbufhash.c
uipc_mqueue.c Initialize reserved bytes in struct mq_attr and its 32compat 2016-11-14 13:20:10 +00:00
uipc_sem.c
uipc_shm.c Remove most of the code for implementing PG_CACHED pages. (This change does 2016-11-15 18:22:50 +00:00
uipc_sockbuf.c
uipc_socket.c Revert r306186 ("Adjust the sopt_val pointer on bigendian systems"). 2016-11-22 18:31:43 +00:00
uipc_syscalls.c Rework r306337. 2016-10-21 18:27:30 +00:00
uipc_usrreq.c
vfs_acl.c
vfs_aio.c
vfs_bio.c Release laundered vnode pages to the head of the inactive queue. 2016-11-23 17:53:07 +00:00
vfs_cache.c cache: ensure that the number of bucket locks does not exceed hash size 2016-11-23 19:50:12 +00:00
vfs_cluster.c Add BUF_TRACKING and FULL_BUF_TRACKING buffer debugging 2016-10-31 23:09:52 +00:00
vfs_default.c
vfs_export.c Fix build when no INET and INET6 in kernel config. 2016-11-17 16:13:30 +00:00
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c Allow some dotdot lookups in capability mode. 2016-11-02 12:43:15 +00:00
vfs_mount.c Provide simple mutual exclusion between mount point update and unmount. 2016-11-13 21:49:51 +00:00
vfs_mountroot.c Limit scope of the optimization in r306608 to dounmount() caller only. 2016-10-07 11:38:28 +00:00
vfs_subr.c Launder VPO_NOSYNC pages upon vnode deactivation. 2016-11-26 21:00:27 +00:00
vfs_syscalls.c Allow some dotdot lookups in capability mode. 2016-11-02 12:43:15 +00:00
vfs_vnops.c
vnode_if.src