FreeBSD/src 61a74c5 (r355779)sys/cddl/compat/opensolaris/sys proc.h, sys/compat/linux linux_fork.c

schedlock 1/4

Eliminate recursion from most thread_lock consumers.  Return from
sched_add() without the thread_lock held.  This eliminates unnecessary
atomics and lock word loads as well as reducing the hold time for
scheduler locks.  This will eventually allow for lockless remote adds.

Discussed with: kib
Reviewed by:    jhb
Tested by:      pho
Differential Revision:  https://reviews.freebsd.org/D22626
DeltaFile
+94-66sys/kern/subr_sleepqueue.c
+50-38sys/kern/sched_ule.c
+41-25sys/kern/sched_4bsd.c
+39-17sys/kern/kern_thread.c
+28-25sys/kern/kern_sig.c
+24-16sys/kern/kern_synch.c
+16-9sys/kern/kern_resource.c
+21-4sys/sys/proc.h
+17-4sys/kern/kern_mutex.c
+7-4sys/sys/sched.h
+5-6sys/kern/subr_turnstile.c
+4-3sys/vm/vm_swapout.c
+3-3sys/mips/nlm/cms.c
+3-3sys/kern/kern_intr.c
+3-2sys/kern/subr_pcpu.c
+0-4sys/compat/linux/linux_fork.c
+2-2sys/kern/kern_kthread.c
+1-2sys/kern/kern_clock.c
+2-0sys/dev/ocs_fc/ocs_os.c
+0-1sys/kern/kern_thr.c
+0-1sys/compat/linuxkpi/common/src/linux_kthread.c
+0-1sys/kern/init_main.c
+0-1sys/kern/kern_fork.c
+0-1sys/cddl/compat/opensolaris/sys/proc.h
+0-1sys/kern/subr_gtaskqueue.c
+0-1sys/kern/subr_taskqueue.c
+1-0sys/sys/resourcevar.h
+361-24027 files

UnifiedSplitRaw