freebsd-dev/sys/kern
Jeff Roberson ace8398da0 Refactor select to reduce contention and hide internal implementation
details from consumers.

 - Track individual selecters on a per-descriptor basis such that there
   are no longer collisions and after sleeping for events only those
   descriptors which triggered events must be rescaned.
 - Protect the selinfo (per descriptor) structure with a mtx pool mutex.
   mtx pool mutexes were chosen to preserve api compatibility with
   existing code which does nothing but bzero() to setup selinfo
   structures.
 - Use a per-thread wait channel rather than a global wait channel.
 - Hide select implementation details in a seltd structure which is
   opaque to the rest of the kernel.
 - Provide a 'selsocket' interface for those kernel consumers who wish to
   select on a socket when they have no fd so they no longer have to
   be aware of select implementation details.

Tested by:	kris
Reviewed on:	arch
2007-12-16 06:21:20 +00:00
..
bus_if.m
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Implement fetching of the __FreeBSD_version from the ELF ABI-tag note. 2007-12-04 12:28:07 +00:00
imgact_gzip.c Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00
imgact_shell.c
inflate.c
init_main.c Implement fetching of the __FreeBSD_version from the ELF ABI-tag note. 2007-12-04 12:28:07 +00:00
init_sysent.c Regenerate. 2007-08-16 05:32:26 +00:00
kern_acct.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
kern_alq.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
kern_clock.c Move use of 'i' in cp_time sysctl under SCTL_MASK32 so that it compiles 2007-11-29 08:38:22 +00:00
kern_condvar.c
kern_conf.c Apply a workaround for the unkillable jail problem where some devices created 2007-12-05 01:22:03 +00:00
kern_context.c
kern_cpu.c If we're on an SMP kernel and there is more than 1 CPU, reject any attempts 2007-10-30 22:18:08 +00:00
kern_descrip.c Add two new sysctls in support of the forthcoming procstat(1) to support 2007-12-02 10:10:27 +00:00
kern_environment.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
kern_event.c Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
kern_exec.c Implement fetching of the __FreeBSD_version from the ELF ABI-tag note. 2007-12-04 12:28:07 +00:00
kern_exit.c Introduce a way to make pure kernal threads. 2007-10-26 08:00:41 +00:00
kern_fork.c When forking, the new thread deserves a name too. Don't just use the 2007-11-15 02:13:44 +00:00
kern_idle.c rename the process to 'idle' and 'intr' as per jhb. 2007-10-27 00:52:26 +00:00
kern_intr.c fix typo in code normally not compiled in. 2007-10-29 20:45:31 +00:00
kern_jail.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
kern_kse.c Fix build. 2007-11-15 14:16:20 +00:00
kern_kthread.c Acquire the process mutex and spin locks before calling thread_exit() in 2007-11-15 21:45:17 +00:00
kern_ktr.c
kern_ktrace.c A bunch more files that should probably print out a thread name 2007-11-14 06:51:33 +00:00
kern_linker.c The kernel linker includes a number of utility functions to look up symbol 2007-12-01 19:24:28 +00:00
kern_lock.c Modify stack(9) stack_print() and stack_sbuf_print() routines to use new 2007-12-01 22:04:16 +00:00
kern_lockf.c
kern_malloc.c
kern_mbuf.c - fix tab to space issue, hmm maybe I should use vi. 2007-12-15 23:14:53 +00:00
kern_mib.c Implement fetching of the __FreeBSD_version from the ELF ABI-tag note. 2007-12-04 12:28:07 +00:00
kern_module.c Move several data structure definitions out of freebsd32_misc.c and into 2007-12-06 23:11:27 +00:00
kern_mtxpool.c
kern_mutex.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
kern_ntptime.c
kern_physio.c
kern_pmc.c Kernel and hwpmc(4) support for callchain capture. 2007-12-07 08:20:17 +00:00
kern_poll.c
kern_priv.c
kern_proc.c Check for P_WEXIT before PHOLD() on a process in kstack and vm query 2007-12-09 17:22:27 +00:00
kern_prot.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
kern_resource.c Fix LOR of thread lock and umtx's priority propagation mutex due 2007-12-11 08:25:36 +00:00
kern_rmlock.c Expand lock class with the "virtual" function lc_assert which will offer 2007-11-18 14:43:53 +00:00
kern_rwlock.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
kern_sema.c
kern_shutdown.c Introduce a way to make pure kernal threads. 2007-10-26 08:00:41 +00:00
kern_sig.c Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00
kern_subr.c
kern_switch.c generally we are interested in what thread did something as 2007-11-14 06:21:24 +00:00
kern_sx.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
kern_synch.c A bunch more files that should probably print out a thread name 2007-11-14 06:51:33 +00:00
kern_syscalls.c
kern_sysctl.c Add sysctl_rename_oid() to support device_set_unit() usage. Otherwise, 2007-11-30 21:29:08 +00:00
kern_tc.c
kern_thr.c This time REALLY copy the name from the proc to the thread as a default. 2007-11-15 06:35:26 +00:00
kern_thread.c Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
kern_time.c
kern_timeout.c Cache the value of c_lock as it can change, in the struct, 2007-11-22 12:15:54 +00:00
kern_umtx.c Add function UMTX_OP_WAIT_UINT, the function causes thread to wait for 2007-11-21 04:21:02 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
link_elf.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
linker_if.m Add a function to list symbols in a file and their values at the 2007-11-18 00:23:31 +00:00
Make.tags.inc
Makefile style.Makefile(5) 2007-12-14 21:30:51 +00:00
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c generally we are interested in what thread did something as 2007-11-14 06:21:24 +00:00
posix4_mib.c
sched_4bsd.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
sched_ule.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
serdev_if.m
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_bus.c Deal with the possibility of device_set_unit() being called when attaching 2007-11-30 21:30:14 +00:00
subr_clist.c
subr_clock.c
subr_devstat.c
subr_disk.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hints.c
subr_kdb.c - Move all of the PS_ flags into either p_flag or td_flags. 2007-09-17 05:31:39 +00:00
subr_kobj.c
subr_lock.c - Re-implement lock profiling in such a way that it no longer breaks 2007-12-15 23:13:31 +00:00
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Export maxswzone, maxbcache, maxtsiz, dfldsiz, maxdsiz, dflssiz, maxssiz, 2007-10-16 10:40:53 +00:00
subr_pcpu.c generally we are interested in what thread did something as 2007-11-14 06:21:24 +00:00
subr_power.c
subr_prf.c
subr_prof.c
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sleepqueue.c A bunch more files that should probably print out a thread name 2007-11-14 06:51:33 +00:00
subr_smp.c Initial checkin for rmlock (read mostly lock) a multi reader single writer 2007-11-08 14:47:55 +00:00
subr_stack.c When a symbol name can't be resolved, return "??" as the name, rather 2007-12-03 14:44:35 +00:00
subr_taskqueue.c Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
subr_trap.c Kernel and hwpmc(4) support for callchain capture. 2007-12-07 08:20:17 +00:00
subr_turnstile.c generally we are interested in what thread did something as 2007-11-14 06:21:24 +00:00
subr_unit.c
subr_witness.c Fix the spinlock static table adding missing spinlocks. 2007-11-24 04:32:32 +00:00
sys_generic.c Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
sys_pipe.c Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
sys_process.c Use VM_FAULT_DIRTY to fault in pages for write access in 2007-11-08 19:35:36 +00:00
sys_socket.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
syscalls.c Regenerate. 2007-08-16 05:32:26 +00:00
syscalls.master Put comments about syscalls by the correct ones, and use the correct syscall 2007-10-19 19:17:53 +00:00
systrace_args.c Regenerate. 2007-08-16 05:32:26 +00:00
sysv_ipc.c
sysv_msg.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
sysv_sem.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
sysv_shm.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
tty_compat.c
tty_conf.c
tty_cons.c
tty_pts.c
tty_pty.c Bump up the number of ttys supported by pty(4) to 512 by making use of 2007-11-19 20:49:42 +00:00
tty_subr.c
tty_tty.c
tty.c
uipc_accf.c
uipc_cow.c
uipc_debug.c
uipc_domain.c
uipc_mbuf2.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
uipc_mbuf.c This patch adds an M_NOFREE flag which allows one to mark an mbuf as 2007-10-06 21:42:39 +00:00
uipc_mqueue.c
uipc_sem.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
uipc_sockbuf.c Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
uipc_socket.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
uipc_syscalls.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
uipc_usrreq.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vfs_acl.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vfs_aio.c Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
vfs_bio.c Eliminate vfs_page_set_valid()'s unused argument. 2007-12-02 01:28:35 +00:00
vfs_cache.c Remove remaining Giant acquisition around vn_fullpath1. This was missed 2007-11-22 21:26:25 +00:00
vfs_cluster.c
vfs_default.c
vfs_export.c
vfs_extattr.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vfs_hash.c
vfs_init.c
vfs_lookup.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vfs_mount.c In nmount(), internally convert the mount option: "rdonly" to "ro". 2007-12-05 03:26:14 +00:00
vfs_subr.c Use curthread instead of the FIRST_THREAD_IN_PROC for vnlru and syncer, 2007-12-05 09:34:04 +00:00
vfs_syscalls.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vfs_vnops.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
vnode_if.src