freebsd-skq/sys/kern
rwatson 6955067932 Reimplement and/or implement vnet list locking by replacing a mostly
unused custom mutex/condvar-based sleep locks with two locks: an
rwlock (for non-sleeping use) and sxlock (for sleeping use).  Either
acquired for read is sufficient to stabilize the vnet list, but both
must be acquired for write to modify the list.

Replace previous no-op read locking macros, used in various places
in the stack, with actual locking to prevent race conditions.  Callers
must declare when they may perform unbounded sleeps or not when
selecting how to lock.

Refactor vnet sysinits so that the vnet list and locks are initialized
before kernel modules are linked, as the kernel linker will use them
for modules loaded by the boot loader.

Update various consumers of these KPIs based on whether they may sleep
or not.

Reviewed by:	bz
Approved by:	re (kib)
2009-07-19 14:20:53 +00:00
..
bus_if.m Add support for multiple passes of the device tree during the boot-time 2009-06-09 14:26:23 +00:00
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
init_sysent.c Regenerate after lpathconf(2) addition. 2009-07-08 15:25:27 +00:00
kern_acct.c Do not use casts (int *)0 and (struct thread *)0 for the arguments of 2009-06-16 15:13:45 +00:00
kern_alq.c Add another flags argument to vn_open_cred. Use it to specify that some 2009-06-21 13:41:32 +00:00
kern_clock.c Mark the clock sysctls as MPSAFE. 2009-05-18 12:03:43 +00:00
kern_condvar.c
kern_conf.c Add an extension to the character device interface that allows character 2009-06-01 21:32:52 +00:00
kern_cons.c
kern_context.c
kern_cpu.c Provide a new CPU device driver ivar to report the nominal speed of the 2009-05-31 08:59:15 +00:00
kern_cpuset.c Remove unnecessary/redundant includes. 2009-06-23 14:39:21 +00:00
kern_ctf.c
kern_descrip.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
kern_dtrace.c
kern_environment.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
kern_event.c - Turn the third (islocked) argument of the knote call into flags parameter. 2009-06-28 21:49:43 +00:00
kern_exec.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
kern_exit.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_fail.c fail(9) support: 2009-05-27 16:36:54 +00:00
kern_fork.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_idle.c
kern_intr.c Improve the handling of cpuset with interrupts. 2009-07-01 17:20:07 +00:00
kern_jail.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_kthread.c
kern_ktr.c
kern_ktrace.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
kern_linker.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_lock.c Introduce support for adaptive spinning in lockmgr. 2009-06-17 01:55:42 +00:00
kern_lockf.c In lf_iteratelocks_vnode, increment state->ls_threads around iterating 2009-06-25 18:54:56 +00:00
kern_lockstat.c Add the OpenSolaris dtrace lockstat provider. The lockstat provider 2009-05-26 20:28:22 +00:00
kern_malloc.c If we're passed garbage in malloc_init(), panic() rather than expecting 2009-06-05 09:16:52 +00:00
kern_mbuf.c Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
kern_mib.c Rename the host-related prison fields to be the same as the host.* 2009-06-13 15:39:12 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c Remove extra cpu_spinwait() invocations. This should really only be used 2009-05-29 14:03:34 +00:00
kern_ntptime.c
kern_osd.c Make the rmlock(9) interface a bit more like the rwlock(9) interface: 2009-05-29 10:52:37 +00:00
kern_physio.c
kern_pmc.c
kern_poll.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
kern_priv.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
kern_proc.c Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
kern_prot.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_resource.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
kern_rmlock.c Minor style tweak. 2009-05-29 14:25:51 +00:00
kern_rwlock.c Handle lock recursion differenty by always checking against LO_RECURSABLE 2009-06-02 13:03:35 +00:00
kern_sdt.c
kern_sema.c
kern_shutdown.c Rename the host-related prison fields to be the same as the host.* 2009-06-13 15:39:12 +00:00
kern_sig.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
kern_subr.c
kern_switch.c - Use DPCPU for SCHED_STATS. This is somewhat awkward because the 2009-06-25 01:33:51 +00:00
kern_sx.c Handle lock recursion differenty by always checking against LO_RECURSABLE 2009-06-02 13:03:35 +00:00
kern_synch.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
kern_syscalls.c
kern_sysctl.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
kern_tc.c
kern_thr.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
kern_thread.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
kern_time.c
kern_timeout.c
kern_umtx.c
kern_uuid.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
kern_vimage.c Reimplement and/or implement vnet list locking by replacing a mostly 2009-07-19 14:20:53 +00:00
kern_xxx.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
ksched.c
link_elf_obj.c r195699 introduced an assertion regarding when progbits data in kernel 2009-07-15 09:19:01 +00:00
link_elf.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
linker_if.m strict kobj signatures: linker_if fixes 2009-06-11 17:05:45 +00:00
Make.tags.inc
Makefile
makesyscalls.sh Add a new COMPAT7 flag for FreeBSD 7.x compatibility system calls. 2009-06-24 13:36:37 +00:00
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c
sched_ule.c - Use cpuset_t and the CPU_ macros in place of cpumask_t so that ULE 2009-06-23 22:12:37 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c Add part of NFSv4 ACL kernel support code that is required for the upcoming 2009-06-09 19:51:22 +00:00
subr_acl_posix1e.c Make 'struct acl' larger, as required to support NFSv4 ACLs. Provide 2009-05-22 15:56:43 +00:00
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus.c We can actually remove devclass_find_driver. 2009-06-10 01:02:38 +00:00
subr_clock.c
subr_devstat.c
subr_disk.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hints.c
subr_kdb.c Spell NULL properly, use (void) rather than () for functions with no 2009-05-09 19:08:22 +00:00
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Increase HZ_VM from 10 to 100. While 10 hz saves cpu time 2009-07-08 01:09:12 +00:00
subr_pcpu.c - Add a sysctl_dpcpu_long to support long typed pcpu stats. 2009-06-25 01:31:59 +00:00
subr_power.c
subr_prf.c
subr_prof.c
subr_rman.c sysctl_rman: report shared resources to devinfo 2009-05-19 14:08:21 +00:00
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sglist.c Add a simple API to manage scatter/gather lists of phyiscal addresses. 2009-06-01 20:35:39 +00:00
subr_sleepqueue.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
subr_smp.c - Remove the bogus idle thread state code. This may have a race in it 2009-04-29 03:15:43 +00:00
subr_stack.c Add stack_print_short() and stack_print_short_ddb() interfaces to 2009-06-24 12:06:15 +00:00
subr_taskqueue.c
subr_trap.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
subr_turnstile.c
subr_unit.c
subr_witness.c Add minimal ZFS lock hierarchy 2009-05-20 02:51:48 +00:00
sys_generic.c Audit file descriptor and command arguments to ioctl(2). 2009-07-02 09:16:25 +00:00
sys_pipe.c Fix poll(2) and select(2) for named pipes to return "ready for read" 2009-07-07 09:43:44 +00:00
sys_process.c Clean up a number of aspects of token generation from audit arguments to 2009-07-02 09:15:30 +00:00
sys_socket.c Add FIONSPACE from NetBSD. FIONSPACE is provided so that programs may 2009-06-30 13:38:49 +00:00
syscalls.c Regenerate after lpathconf(2) addition. 2009-07-08 15:25:27 +00:00
syscalls.master There is an optimization in chmod(1), that makes it not to call chmod(2) 2009-07-08 15:23:18 +00:00
systrace_args.c Regenerate after lpathconf(2) addition. 2009-07-08 15:25:27 +00:00
sysv_ipc.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_msg.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_sem.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_shm.c Use the correct cast for the arguments passed to freebsd_shmctl() in 2009-06-25 17:11:27 +00:00
tty_compat.c
tty_info.c Print an extra newline when not at the first column already. 2009-05-17 16:17:48 +00:00
tty_inq.c Enable secure TTY input buffer flushing by default. 2009-05-21 16:48:06 +00:00
tty_outq.c
tty_pts.c Fix regressions in return events of poll() on TTYs. 2009-07-08 10:21:52 +00:00
tty_pty.c
tty_tty.c
tty_ttydisc.c If we have a regular rint handler, never go into rint_bypass mode. 2009-05-07 17:39:23 +00:00
tty.c Fix regressions in return events of poll() on TTYs. 2009-07-08 10:21:52 +00:00
uipc_accf.c
uipc_cow.c
uipc_debug.c Add missing socket options. 2009-05-26 09:19:21 +00:00
uipc_domain.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
uipc_mbuf2.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
uipc_mbuf.c Add m_mbuftouio() helper function to copy(out) an arbitrary 2009-06-22 22:20:38 +00:00
uipc_mqueue.c Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use 2009-06-10 20:59:32 +00:00
uipc_sem.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
uipc_shm.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
uipc_sockbuf.c In sbappendstream_locked() demote all incoming packet mbufs (and 2009-06-22 21:46:40 +00:00
uipc_socket.c Fix poll(2) and select(2) for named pipes to return "ready for read" 2009-07-07 09:43:44 +00:00
uipc_syscalls.c Audit file descriptor numbers for various socket-related system calls. 2009-07-01 19:55:11 +00:00
uipc_usrreq.c Remove unnecessary/redundant includes. 2009-06-23 14:39:21 +00:00
vfs_acl.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
vfs_aio.c Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use 2009-06-10 20:59:32 +00:00
vfs_bio.c Eliminate an unused variable from allocbuf(). 2009-06-07 18:19:04 +00:00
vfs_cache.c Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by 2009-06-21 19:21:01 +00:00
vfs_cluster.c Remove a stale comment. The very same revision (r85511) that introduced 2009-06-30 19:39:17 +00:00
vfs_default.c Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by 2009-06-21 19:21:01 +00:00
vfs_export.c Free struct ucreds allocated in vfs_hang_addrlist() when deleting 2009-06-29 18:09:07 +00:00
vfs_extattr.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
vfs_hash.c
vfs_init.c
vfs_lookup.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
vfs_mount.c When auditing unmount(2), capture FSID arguments as regular text strings 2009-07-01 16:56:56 +00:00
vfs_subr.c Call prison_check from vfs_suser rather than re-implementing it. 2009-07-02 14:19:33 +00:00
vfs_syscalls.c There is an optimization in chmod(1), that makes it not to call chmod(2) 2009-07-08 15:23:18 +00:00
vfs_vnops.c In vn_vget_ino() and their inline equivalents, mnt_ref() the mount point 2009-07-02 18:02:55 +00:00
vnode_if.src Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by 2009-06-21 19:21:01 +00:00