freebsd-dev/sys
Marius Strobl 7815d3948c o Revert the other functional half of r239864, i. e. the merge of r134227
from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus()
  but also for the MD cache invalidation, TLB demapping and remote register
  reading IPIs due to the following reasons:
  - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on
    sparc64. That's because on sparc64, spin locks don't disable interrupts
    completely but only raise the processor interrupt level to PIL_TICK. This
    means that IPIs still get delivered and direct dispatch IPIs such as the
    cache invalidation etc. IPIs in question are still executed.
  - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an
    IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action().
    Consequently, smp_ipi_mtx may be locked for an extended amount of time as
    queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are
    scheduled via a soft interrupt. Moreover, given that this soft interrupt
    is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action()
    on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in
    turn leading to the target in question trying to send an IPI by itself
    while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a
    deadlock.
o As mentioned in the commit message of r245850, on least some sun4u platforms
  concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the
  reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers,
  i. e. ipi_{all_but_self,cpu,selected}().
o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started
  instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually
  are started, when smp_started is no longer 0.
o In all MD and MI IPI helpers, check for smp_started == 1 rather than for
  smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs
  trying to be delivered to APs that in fact aren't up and running, yet.
  While at it, move setting of the cpu_ipi_{selected,single}() pointers to
  the appropriate delivery functions from mp_init() to cpu_mp_start() where
  it's better suited and allows to get rid of the global isjbus variable.
o Given that now concurrent IPI delivery no longer is possible, also nuke
  the delays before completely disabling interrupts again in the CPU-specific
  cross-trap delivery functions, previously giving other CPUs a window for
  sending IPIs on their part. Actually, we now should be able to entirely get
  rid of completely disabling interrupts in these functions. Such a change
  needs more testing, though.
o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not
  necessary for correctness, this avoids page faults when accessing the stack
  of a foreign CPU as {s,}tick now is locked into the TLBs as part of static
  kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as
  possible, avoiding jitter.

PR:		201245
MFC after:	3 days
2015-07-24 15:13:21 +00:00
..
amd64 Various changes to the registers displayed in DDB for x86. 2015-07-22 01:09:02 +00:00
arm Implement the lockstat provider using SDT(9) instead of the custom provider 2015-07-19 22:14:09 +00:00
arm64 Teach the GICv2 driver about the Qualcomm GICv2 compatible string. 2015-07-21 18:08:10 +00:00
boot move the prototype to the lib.h header.. This makes more sense, and 2015-07-18 22:47:46 +00:00
bsm
cam Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
cddl Remove checks for a NULL return value from M_WAITOK allocations. 2015-07-21 23:44:36 +00:00
compat Implement the basic system calls that operate on pathnames. 2015-07-24 07:46:02 +00:00
conf Merge ACPICA 20150717. 2015-07-22 16:25:07 +00:00
contrib Merge ACPICA 20150717. 2015-07-22 16:25:07 +00:00
crypto Complete the move that was started w/ r263218.. For some reason I 2015-07-11 03:12:34 +00:00
ddb Various changes to the registers displayed in DDB for x86. 2015-07-22 01:09:02 +00:00
dev Panic when a device is trying to recursively acquire rather than hang 2015-07-24 04:56:46 +00:00
fs The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Add a new option to gpart(8) to fix Lenovo BIOS boot issue 2015-07-15 02:23:55 +00:00
gnu The GNU Amlogic DTS files have some errors (e.g. bad register 2015-04-11 08:17:39 +00:00
i386 Remove duplicate and useless declarations. 2015-07-22 09:12:40 +00:00
isa
kern o Revert the other functional half of r239864, i. e. the merge of r134227 2015-07-24 15:13:21 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Populate hw.model with the CPU model information. 2015-07-14 05:14:10 +00:00
modules Add Makefiles for CloudABI kernel modules. 2015-07-22 07:32:49 +00:00
net Prevent null-pointer dereferencing. 2015-07-20 08:21:51 +00:00
net80211 Break out the current 802.11 software scan methods into an indirect table. 2015-06-08 02:35:43 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet Fix silly syntax error emacs chugged in for me.. gesh. 2015-07-24 14:13:43 +00:00
netinet6 Fix inverted logic bug that David Wolfskill found (thanks David!) 2015-07-22 09:29:50 +00:00
netipsec IPSEC, remove variable argument function its already due. 2015-07-21 21:46:24 +00:00
netnatm
netpfil Add helper functions for IP checksum adjusting. Use these functions in 2015-07-20 07:26:31 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient Remove some oldnfs remnants. 2015-04-18 16:08:06 +00:00
nfsserver
nlm
ofed Fix broken implementation of "kvasprintf()" function by adding missing 2015-07-03 11:16:20 +00:00
opencrypto Fix XTS, and name things a bit better... 2015-07-14 07:45:18 +00:00
pc98 Spell crypto correctly. 2015-07-14 10:47:56 +00:00
powerpc Implement the lockstat provider using SDT(9) instead of the custom provider 2015-07-19 22:14:09 +00:00
rpc Remove hard limits on number of accepting NFS connections. 2015-04-07 10:25:27 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 o Revert the other functional half of r239864, i. e. the merge of r134227 2015-07-24 15:13:21 +00:00
sys Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
teken
tools
ufs Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vm Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
x86 Typo in comment. 2015-07-20 19:51:41 +00:00
xdr
xen Garbage collect comments which related to the pre-r284296 support for a 2015-06-21 06:05:33 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00