1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/kern
Poul-Henning Kamp 224d5539a9 Make devstat fully Giant agnostic:
Add a mutex and protect the allocation and traversal of the list with it.

When we allocate a page for devstat use we drop the mutex and use
M_WAITOK this is not nice, but under the given circumstances the
best we can do.

In the sysctl handler for returning the devstat entries we do not want to
hold the mutex across copyout(9) calls, so we keep a very careful eye on
the devstat_generation count, and abandon with EBUSY if it changes under
our feet.

Specifically test for BIO_WRITE, rather than default non-read,non-deletes
as write.  Make the default be DEVSTAT_NO_DATA.

Add atomic increments of the sequence[01] fields so applications using the
mmap'ed view stand a chance of detecting updates in progress.

Reviewed by:    ken
2003-03-18 09:20:20 +00:00
..
bus_if.m
clock_if.m
device_if.m
genassym.sh
imgact_aout.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
init_main.c Use the proc lock to protect p_realtimer instead of Giant, and obtain 2003-02-17 10:03:02 +00:00
init_sysent.c Add a timeout parameter to kse_release. 2003-02-20 08:18:15 +00:00
kern_acct.c Trim some trailing whitespace. 2003-03-13 23:07:09 +00:00
kern_acl.c
kern_alq.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_clock.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
kern_condvar.c Replace calls to WITNESS_SLEEP() and witness_list() with equivalent calls 2003-03-04 21:03:05 +00:00
kern_conf.c Add one little hack to allow us to make MAJOR_AUTO be zero: 2003-03-09 10:28:05 +00:00
kern_context.c
kern_descrip.c Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
kern_environment.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_event.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_exec.c - Cache a reference to the credential of the thread that starts a ktrace in 2003-03-13 18:24:22 +00:00
kern_exit.c - Cache a reference to the credential of the thread that starts a ktrace in 2003-03-13 18:24:22 +00:00
kern_fork.c - Cache a reference to the credential of the thread that starts a ktrace in 2003-03-13 18:24:22 +00:00
kern_idle.c
kern_intr.c Add a WITNESS_WARN() call to verify that we hold no locks after running 2003-03-04 21:01:42 +00:00
kern_jail.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_kse.c Export current time when returning from never blocked syscall. 2003-03-14 03:52:16 +00:00
kern_kthread.c
kern_ktr.c Trim leading "../" sequences from filenames. 2003-03-11 19:56:16 +00:00
kern_ktrace.c Add a new userland-visible ktrace flag KTR_DROP and an internal ktrace flag 2003-03-13 18:31:15 +00:00
kern_linker.c FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch 2003-03-03 22:53:35 +00:00
kern_lock.c Use the KTR_LOCK mask for logging events via KTR in lockmgr() rather 2003-03-11 20:00:37 +00:00
kern_lockf.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
kern_mac.c Instrument sysarch() MD privileged I/O access interfaces with a MAC 2003-03-06 04:47:47 +00:00
kern_malloc.c PHCC[1]: 2003-03-10 20:24:54 +00:00
kern_mib.c
kern_module.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_mtxpool.c
kern_mutex.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
kern_ntptime.c
kern_physio.c - Add a lock for protecting against msleep(bp, ...) wakeup(bp) races. 2003-03-13 07:31:45 +00:00
kern_poll.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
kern_proc.c - Cache a reference to the credential of the thread that starts a ktrace in 2003-03-13 18:24:22 +00:00
kern_prot.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern_resource.c Back out previous. The locking here needs a rethink. 2003-03-13 00:54:53 +00:00
kern_sema.c
kern_shutdown.c style. 2003-02-14 12:44:48 +00:00
kern_sig.c Fix threaded process job control bug. SMP tested. 2003-03-11 00:07:53 +00:00
kern_subr.c Zero copy send and receive fixes: 2003-03-08 06:58:18 +00:00
kern_switch.c Cosmetic change, make it QUEUE_MACRO_DEBUG friendly 2003-03-09 04:27:46 +00:00
kern_sx.c
kern_synch.c Replace calls to WITNESS_SLEEP() and witness_list() with equivalent calls 2003-03-04 21:03:05 +00:00
kern_syscalls.c
kern_sysctl.c Use a shorter and less redundant name for the sysctl tree lock. 2003-03-11 20:01:51 +00:00
kern_tc.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
kern_thread.c Export current time when returning from never blocked syscall. 2003-03-14 03:52:16 +00:00
kern_time.c o fix ppsratecheck to interpret a maxpps of zero as "ignore everything" 2003-02-26 17:16:38 +00:00
kern_timeout.c Under DIAGNOSTIC, only report expensive timeouts if they are more expensive 2003-02-01 10:06:40 +00:00
kern_uuid.c
kern_xxx.c
ksched.c Move a bunch of flags from the KSE to the thread. 2003-02-17 09:55:10 +00:00
link_elf_obj.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
link_elf.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
linker_if.m
Make.tags.inc Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
Makefile Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c Change the process flags P_KSES to be P_THREADED. 2003-02-27 02:05:19 +00:00
sched_ule.c - Create a function sched_interact_score() which decides on the 2003-03-04 02:45:59 +00:00
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
subr_bus.c Make sure we actually have a dev before dereferencing in case someone 2003-03-13 06:29:44 +00:00
subr_clist.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
subr_clock.c Split the global timezone structure into two integer fields to 2003-02-03 19:49:35 +00:00
subr_devstat.c Make devstat fully Giant agnostic: 2003-03-18 09:20:20 +00:00
subr_disk.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
subr_eventhandler.c Rework the eventhandler locking for hopefully the last time. The scheme 2003-03-11 20:17:00 +00:00
subr_hints.c
subr_kobj.c
subr_log.c Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
subr_mbuf.c PHCC[1]: 2003-03-10 20:24:54 +00:00
subr_mchain.c The "m = m->m_next" that was removed in the revision 1.12 was necessary 2003-02-19 10:12:42 +00:00
subr_module.c
subr_param.c
subr_pcpu.c
subr_power.c
subr_prf.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
subr_prof.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
subr_rman.c Implement rman_get_device 2003-02-12 07:00:59 +00:00
subr_rtc.c Split the global timezone structure into two integer fields to 2003-02-03 19:49:35 +00:00
subr_sbuf.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
subr_scanf.c
subr_smp.c Move a bunch of flags from the KSE to the thread. 2003-02-17 09:55:10 +00:00
subr_taskqueue.c Introduce a new taskqueue that runs completely free of Giant, and in 2003-02-26 03:15:42 +00:00
subr_trap.c Fix signal delivering bug for threaded process. 2003-03-11 02:59:50 +00:00
subr_turnstile.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
subr_witness.c Trim an extra blank line that snuck into the last commit. 2003-03-11 22:33:42 +00:00
subr_xxx.c Make nokqfilter() return the correct return value. 2003-03-03 16:24:47 +00:00
sys_generic.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sys_pipe.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sys_process.c
sys_socket.c Remove duplicate includes. 2003-02-20 03:26:11 +00:00
syscalls.c Add a timeout parameter to kse_release. 2003-02-20 08:18:15 +00:00
syscalls.master Add a timeout parameter to kse_release. 2003-02-20 08:18:15 +00:00
sysv_ipc.c
sysv_msg.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sysv_sem.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sysv_shm.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
tty_compat.c
tty_conf.c
tty_cons.c Don't call make_dev() before we are ready for it. 2003-03-09 20:42:49 +00:00
tty_pty.c Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
tty_subr.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
tty_tty.c Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
tty.c Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
uipc_accf.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
uipc_cow.c Pass the sf buf to MEXTADD() as the optional argument. This permits 2003-03-16 07:19:12 +00:00
uipc_domain.c Fix a spelling error. 2003-03-07 22:47:32 +00:00
uipc_jumbo.c Remove duplicate includes. 2003-02-20 03:26:11 +00:00
uipc_mbuf2.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
uipc_mbuf.c In m_dup_pkthdr(), convert the supplied `how' argument into malloc 2003-03-13 09:02:19 +00:00
uipc_proto.c
uipc_sem.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
uipc_sockbuf.c Missing M_TRYWAIT from so_upcall third argument. 2003-02-21 22:23:40 +00:00
uipc_socket2.c Missing M_TRYWAIT from so_upcall third argument. 2003-02-21 22:23:40 +00:00
uipc_socket.c Clean up whitespace, s/register //, refrain from strong urge to ANSIfy. 2003-03-02 15:56:49 +00:00
uipc_syscalls.c Pass the sf buf to MEXTADD() as the optional argument. This permits 2003-03-16 07:19:12 +00:00
uipc_usrreq.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vfs_acl.c
vfs_aio.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vfs_bio.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
vfs_cache.c (This commit certainly increases the need for a wash&clean of vfs_cache.c, 2003-03-17 12:21:08 +00:00
vfs_cluster.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
vfs_default.c - Remove a race between fsync like functions and flushbufqueues() by 2003-03-13 07:19:23 +00:00
vfs_export.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vfs_extattr.c Move the initialization of the vattr flags field in setfflags() to 2003-03-05 23:15:23 +00:00
vfs_init.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vfs_lookup.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vfs_mount.c Export the name of the device used to mount the root file system as 2003-02-22 05:01:12 +00:00
vfs_subr.c - Remove a dead check for bp->b_vp == vp in vtruncbuf(). This has not been 2003-03-13 07:22:53 +00:00
vfs_syscalls.c Move the initialization of the vattr flags field in setfflags() to 2003-03-05 23:15:23 +00:00
vfs_vnops.c Do not allow kqueues to be passed via unix domain sockets. 2003-02-15 06:04:55 +00:00
vnode_if.src