freebsd-nq/sys/kern
John Baldwin 7e3a96ea37 Some small fixes to CPU accounting for threads:
- Only initialize the per-cpu switchticks and switchtime in sched_throw()
  for the very first context switch on APs during boot.  This avoids a
  small gap between the middle of thread_exit() and sched_throw() where
  time is not accounted to any thread.
- In thread_exit(), update the timestamp bookkeeping to track the changes
  to mi_switch() introduced by td_rux so that the code once again matches
  the comment claiming it is mimicing mi_switch().  Specifically, only
  update the per-thread stats directly and depend on ruxagg() to update
  p_rux rather than adjusting p_rux directly.  While here, move the
  timestamp bookkeeping as late in the function as possible.

Reviewed by:	bde, kib
MFC after:	1 week
2012-01-03 21:03:28 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Control the execution permission of the readable segments for 2011-10-15 12:35:18 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Remove the long reprecated ``/stand/sysinstall'' from the init_path. 2011-10-27 10:25:11 +00:00
init_sysent.c - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() 2011-11-21 01:26:10 +00:00
kern_acct.c
kern_alq.c
kern_clock.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_clocksource.c
kern_condvar.c
kern_conf.c Use TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT(). 2011-12-22 16:01:10 +00:00
kern_cons.c belatedly transfer copyrights from libkern/gets.c to kern_cons.c 2011-12-17 15:50:45 +00:00
kern_context.c
kern_cpu.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_cpuset.c Add a missing curly bracket 2011-12-05 10:34:52 +00:00
kern_ctf.c The in-kernel CTF parser caches the result of its first attempt to parse 2011-11-08 15:17:54 +00:00
kern_descrip.c Reformat comment to be more readable in standard Xterm. 2011-11-15 01:48:53 +00:00
kern_dtrace.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
kern_environment.c
kern_et.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_event.c
kern_exec.c
kern_exit.c
kern_fail.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
kern_ffclock.c Revise the sysctl handling code and restructure the hierarchy of sysctls 2011-12-01 07:19:13 +00:00
kern_fork.c
kern_gzio.c
kern_hhook.c
kern_idle.c
kern_intr.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
kern_jail.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_khelp.c
kern_kthread.c
kern_ktr.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
kern_ktrace.c - Fix ktrace leakage if error is set 2011-12-08 03:20:38 +00:00
kern_linker.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
kern_lock.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
kern_lockf.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
kern_lockstat.c
kern_loginclass.c
kern_malloc.c Eliminate stale numbers from a comment. 2011-12-07 16:27:23 +00:00
kern_mbuf.c
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
kern_ntptime.c Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The 2011-12-24 01:32:01 +00:00
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_priv.c
kern_proc.c Fix style and white spaces. 2011-12-17 22:18:26 +00:00
kern_prot.c
kern_racct.c kern_racct: move sys/systm.h inclusion to its proper place 2011-12-12 07:46:10 +00:00
kern_rctl.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
kern_resource.c - Add a sysctl to allow non-root users the ability to set idle 2011-12-13 14:00:27 +00:00
kern_rmlock.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
kern_rwlock.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
kern_sdt.c
kern_sema.c
kern_shutdown.c introduce cngrab/cnungrab stub calls in some places where they make sense 2011-12-17 15:11:22 +00:00
kern_sig.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kern_switch.c critical_exit: ignore td_owepreempt if kdb_active is set 2011-12-04 21:27:41 +00:00
kern_sx.c put sys/systm.h at its proper place or add it if missing 2011-12-12 10:05:13 +00:00
kern_synch.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
kern_syscalls.c
kern_sysctl.c
kern_tc.c Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The 2011-12-24 01:32:01 +00:00
kern_thr.c Document a large number of currently undocumented sysctls. While here 2011-12-13 00:38:50 +00:00
kern_thread.c Some small fixes to CPU accounting for threads: 2012-01-03 21:03:28 +00:00
kern_time.c
kern_timeout.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
kern_umtx.c Add umtx_copyin_timeout() and move parameter checks here. 2011-12-03 12:30:58 +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 - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() 2011-11-21 01:26:10 +00:00
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c Some small fixes to CPU accounting for threads: 2012-01-03 21:03:28 +00:00
sched_ule.c Some small fixes to CPU accounting for threads: 2012-01-03 21:03:28 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c - Fix typos s/(more|less) then|\1 than/ 2011-12-03 15:41:37 +00:00
subr_bufring.c
subr_bus.c It doesn't make much sense to check whether child is NULL after already 2011-12-02 22:03:27 +00:00
subr_clock.c
subr_devstat.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_disk.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c Do not increment the parent firmware's reference count when any other 2011-11-19 00:20:28 +00:00
subr_hash.c
subr_hints.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
subr_kdb.c introduce cngrab/cnungrab stub calls in some places where they make sense 2011-12-17 15:11:22 +00:00
subr_kobj.c As it turns out, r186347 actually is insufficient to avoid the use of the 2011-11-15 20:11:03 +00:00
subr_lock.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
subr_log.c
subr_mbpool.c
subr_mchain.c Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
subr_power.c
subr_prf.c Fix double vision syndrome (read: double output) when in the 2011-10-16 14:16:46 +00:00
subr_prof.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_rman.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_rtc.c Core structure and functions to support a feed-forward clock within the kernel. 2011-11-19 14:10:16 +00:00
subr_sbuf.c
subr_scanf.c
subr_sglist.c
subr_sleepqueue.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_smp.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_stack.c Constify stack argument for functions that don't modify it. 2011-11-16 19:06:55 +00:00
subr_syscall.c Revert rev. 226893: subr_syscall.c is being included from C files and 2011-10-30 02:19:39 +00:00
subr_taskqueue.c
subr_trap.c
subr_turnstile.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
subr_uio.c Constify args to copyiniov and copyinuio. 2011-11-14 07:12:10 +00:00
subr_unit.c
subr_witness.c panic: add a switch and infrastructure for stopping other CPUs in SMP case 2011-12-11 21:02:01 +00:00
sys_capability.c Revisit the capability failure trace points. The initial implementation 2011-10-18 07:28:58 +00:00
sys_generic.c To limit amount of the kernel memory allocated, and to optimize the 2011-11-13 10:28:01 +00:00
sys_pipe.c Fix select/poll/kqueue for write on reverse direction before first write. 2011-12-14 22:26:39 +00:00
sys_procdesc.c
sys_process.c
sys_socket.c
syscalls.c - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() 2011-11-21 01:26:10 +00:00
syscalls.master - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() 2011-11-21 01:26:10 +00:00
systrace_args.c - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() 2011-11-21 01:26:10 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c
uipc_accf.c
uipc_cow.c
uipc_debug.c
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c
uipc_mqueue.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
uipc_sem.c
uipc_shm.c Use vm_mmap_to_errno(). 2011-12-15 15:17:19 +00:00
uipc_sockbuf.c Document a large number of currently undocumented sysctls. While here 2011-12-13 00:38:50 +00:00
uipc_socket.c Remove a few bits of FreeBSD 2.x compatibility code. 2011-11-14 18:21:27 +00:00
uipc_syscalls.c
uipc_usrreq.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
vfs_acl.c
vfs_aio.c
vfs_bio.c Rename vm_page_set_valid() to vm_page_set_valid_range(). 2011-11-30 17:39:00 +00:00
vfs_cache.c put sys/systm.h at its proper place or add it if missing 2011-12-12 10:05:13 +00:00
vfs_cluster.c
vfs_default.c Existing VOP_VPTOCNP() interface has a fatal flow that is critical for 2011-11-19 07:50:49 +00:00
vfs_export.c
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c Avoid double-unlock or double unreference for ndp->ni_dvp when the vnode dp 2012-01-01 18:45:59 +00:00
vfs_mount.c Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on 2011-11-08 10:18:07 +00:00
vfs_mountroot.c replace uses of libkern gets with cngets 2011-12-17 15:26:34 +00:00
vfs_subr.c Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use 2011-12-23 20:11:37 +00:00
vfs_syscalls.c Fire a kevent if necessary after seeking on a regular file. This fixes a 2011-12-16 20:10:00 +00:00
vfs_vnops.c Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
vnode_if.src Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use 2011-12-23 20:11:37 +00:00