kernel - Optimize lwp-specific signaling.
commita094cc95c3d6615ac48e1e6eb359d5bd96ed4da8
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 25 Jan 2017 17:25:40 +0000 (25 09:25 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 25 Jan 2017 19:07:49 +0000 (25 11:07 -0800)
treecae6fd09288d6b8d545edf0ab126b810e87322e6
parentceb0e493cb08475ce07ea2617ddb66b9b8479e37
kernel - Optimize lwp-specific signaling.

* Optimize the signal code to remove most instances of needing proc->p_token
  when lwp-specific signals are sent.

* Add a CURSIG_LCK_TRACE() macro which can now return with p_token held, and
  pass the status to postsig() which then consumes it.

* lwpsignal() now tries very hard to avoid acquiring proc->p_token.

* Significantly improves vkernel operation under heavy (vkernel) IPI loads.
12 files changed:
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/kern/kern_time.c
sys/kern/lwkt_token.c
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel64/x86_64/trap.c
sys/sys/signal2.h
sys/sys/signalvar.h
sys/sys/systm.h
sys/sys/thread.h
sys/vfs/mfs/mfs_vfsops.c
sys/vfs/procfs/procfs_ctl.c