Matt Macy
e10ef65d23
AF_UNIX: fix LOR introduced by the locking rewrite
2018-05-20 05:50:53 +00:00
Matt Macy
7118990962
Add additional preinitialized cap_rights
2018-05-20 05:13:12 +00:00
Mateusz Guzik
2186ee6e72
vfs: simplify vop_stdlock/unlock
...
The interlock pointer is non-NULL by definition and the compiler see through
that and eliminates the NULL checks. Just remove them from the code as they
play no role.
No difference in generated assembly.
2018-05-20 04:45:05 +00:00
Matt Macy
d95253403f
AF_UNIX: make unpcb lock name line up with what's in witness
2018-05-20 04:32:48 +00:00
Warner Losh
f344fb0b4b
Restore the all rights reserved language. Put it on each of the prior
...
two copyrights. The line originated with the Berkeely Regents, who
we have not approached about removing it (it's honestly too trivial
to be worth that fight). Restore it to rwatson's line as well. He
can decide if he wants it or not on his own. Matt clearly doesn't
want it, per project preference and his own statements on IRC.
Noticed by: rgrimes@
2018-05-19 17:29:57 +00:00
Ed Maste
1b30e10e48
Remove duplicate cap_no_rights from r333874
...
Archs using in-tree gcc were broken with `warning: redundant
redeclaration of 'cap_no_rights' [-Wredundant-decls]`.
Sponsored by: The FreeBSD Foundation
2018-05-19 11:37:02 +00:00
Matt Macy
f6a1a10613
Unbreak BeagleBone Black boot by collapsing 29 SYSINITs in to 1
...
Reported by: ilya at bakulin.de
2018-05-19 07:31:35 +00:00
Matt Macy
fc2e87be2b
intr unbreak KTR/LINT build
2018-05-19 07:04:43 +00:00
Matt Macy
4b06dee1e5
AF_UNIX: switch to annotations to avoid warnings
2018-05-19 05:37:58 +00:00
Matt Macy
acbde29858
capsicum: propagate const correctness
2018-05-19 05:14:05 +00:00
Matt Macy
ba3f7276c0
intr: eliminate / annotate unused stack locals
2018-05-19 05:12:18 +00:00
Matt Macy
7fd6841438
sendfile: annotate unused value and ensure that npages is actually initialized
2018-05-19 05:10:51 +00:00
Matt Macy
e1a92f058f
umtx: don't call umtxq_getchain unless the value is needed
2018-05-19 05:09:10 +00:00
Matt Macy
a6c7423a92
cpuset: revert and annotate instead
2018-05-19 05:07:31 +00:00
Matt Macy
6fa5abfdda
conf: revert last change and annotate unused var instead
2018-05-19 05:07:03 +00:00
Matt Macy
1c0336c1c1
kevent: annotate unused stack local
2018-05-19 05:06:18 +00:00
Matt Macy
788390df0a
lockf: annotate LOCKF_DEBUG only var
2018-05-19 05:04:38 +00:00
Matt Macy
d1230b1159
capsicum: annotate variable only used by debug
2018-05-19 05:02:40 +00:00
Matt Macy
3adccf38e3
turnstile / sleepqueue: annotate variables only used by debug builds
2018-05-19 05:00:16 +00:00
Matt Macy
84482abd21
vfs: annotate variables only used by debug builds as __unused
2018-05-19 04:59:39 +00:00
Matt Macy
a2bb4e080e
tty: use __unused annotation instead to silence warnings
2018-05-19 04:48:26 +00:00
Matt Macy
5072a5f465
malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined
2018-05-19 04:43:49 +00:00
Matt Macy
39eef2f45a
cpuset_thread0: avoid unused assignment on non debug build
2018-05-19 04:14:00 +00:00
Matt Macy
926cfdb8da
make_dev: avoid unused assignments on non debug builds
2018-05-19 04:13:20 +00:00
Matt Macy
4949ad7264
mqueue: avoid unused variables
2018-05-19 04:10:53 +00:00
Matt Macy
cd6ba3f086
physio: avoid uninitialized variables
2018-05-19 04:09:58 +00:00
Matt Macy
e9b1074bc7
cache_lookup remove unused variable and initialize used
2018-05-19 04:08:11 +00:00
Matt Macy
ec8d23352b
filt_timerdetach: only assign to old if we're going to check it in
...
a KASSERT
2018-05-19 04:07:00 +00:00
Matt Macy
5cc2d25a2b
getnextevent: put variable only used by KTR under ifdef KTR
2018-05-19 04:05:36 +00:00
Matt Macy
bfd0eacb02
simplify control flow so that gcc knows we never pass save to curthread_pflags_restore
...
without initializing
2018-05-19 04:04:44 +00:00
Matt Macy
3ef78c9c96
tty: conditionally assign to ret value only used by MPASS statement
2018-05-19 04:02:29 +00:00
Matt Macy
02fe8a2409
remove unused locked variable in lockmgr_unlock_fast_path
2018-05-19 03:58:40 +00:00
Matt Macy
ddd4d15ecd
signotify: don't create a stack local that isn't used on non-debug builds
2018-05-19 03:57:41 +00:00
Matt Macy
46117e1f0c
sysv_msg initialize saved_msgsz
2018-05-19 03:56:39 +00:00
Matt Macy
11d4f748d7
remove unused variable
2018-05-19 03:55:42 +00:00
Matt Macy
1dce110f63
fix uninitialized variable warning in reader locks
2018-05-19 03:52:55 +00:00
Matt Macy
b203713694
fix uninitialized variable warning
2018-05-19 03:49:36 +00:00
Matt Macy
ac8b2d5cb1
sys_process.c fix set but not used warning
2018-05-19 03:48:35 +00:00
Matt Macy
e339e43685
subr_epoch.c fix unused variable warnings
2018-05-19 03:47:37 +00:00
Matt Macy
ae6be8e6f7
pidctrl Actually use the variables that we assign to as seatbelts to prevent divide
...
by zero
Reviewed by: jeffr
2018-05-19 02:17:18 +00:00
Matt Macy
c0874c3468
fix gcc8 unused variable and set but not used variable in unix sockets
...
add copyright from lock rewrite while here
2018-05-19 02:15:40 +00:00
Mateusz Guzik
10391db530
lockmgr: avoid atomic on unlock in the slow path
...
The code is pretty much guaranteed not to be able to unlock.
This is a minor nit. The code still performs way too many reads.
The altered exclusive-locked condition is supposed to be always
true as well, to be cleaned up at a later date.
2018-05-18 22:57:52 +00:00
Matt Macy
d7c5a620e2
ifnet: Replace if_addr_lock rwlock with epoch + mutex
...
Run on LLNW canaries and tested by pho@
gallatin:
Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5
based ConnectX 4-LX NIC, I see an almost 12% improvement in received
packet rate, and a larger improvement in bytes delivered all the way
to userspace.
When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,
I see, using nstat -I mce0 1 before the patch:
InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree
4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32
4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32
4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32
4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32
4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32
4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32
4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32
After the patch
InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree
5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51
5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51
5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51
5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51
5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52
5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52
Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch
Reviewed by: gallatin
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15366
2018-05-18 20:13:34 +00:00
Matt Macy
20ba6811e6
epoch(9): assert that epoch is allocated post-configure
2018-05-18 18:27:17 +00:00
Ed Maste
891cf3ed44
Use NULL for SYSINIT's last arg, which is a pointer type
...
Sponsored by: The FreeBSD Foundation
2018-05-18 17:58:09 +00:00
Matt Macy
70398c2f86
epoch(9): Make epochs non-preemptible by default
...
There are risks associated with waiting on a preemptible epoch section.
Change the name to make them not be the default and document the issue
under CAVEATS.
Reported by: markj
2018-05-18 17:29:43 +00:00
Matt Macy
60b7b90d65
epoch: actually allocate the counters we've assigned sysctls too
...
Approved by: sbruno
2018-05-18 02:57:39 +00:00
Matt Macy
5e68a3dfe3
epoch: add non-preemptible "critical" variant
...
adds:
- epoch_enter_critical() - can be called inside a different epoch,
starts a section that will acquire any MTX_DEF mutexes or do
anything that might sleep.
- epoch_exit_critical() - corresponding exit call
- epoch_wait_critical() - wait variant that is guaranteed that any
threads in a section are running.
- epoch_global_critical - an epoch_wait_critical safe epoch instance
Requested by: markj
Approved by: sbruno
2018-05-18 01:52:51 +00:00
Brooks Davis
dedc82ae26
Use strsep() to parse init_path in start_init().
...
This simplifies the use of the path variable by making it NUL
terminated. This is a prerequisite for further cleanups.
Reviewed by: imp
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15467
2018-05-17 23:07:51 +00:00
Matt Macy
a5f1042498
epoch: skip poll function call in hardclock unless there are callbacks pending
...
Reported by: mjg
Approved by: sbruno
2018-05-17 21:39:15 +00:00