Commit Graph

131392 Commits

Author SHA1 Message Date
mmacy
ace81143fd epoch: avoid warning when INVARIANTS is not enabled 2018-05-19 04:47:34 +00:00
mmacy
b2201d4e88 disable set but not used on code that can't be changed 2018-05-19 04:46:34 +00:00
mmacy
366f674ab5 malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined 2018-05-19 04:43:49 +00:00
jhibbits
96915338d5 Add hypervisor trap handling, using HSRR0/HSRR1
Summary:
Some hypervisor exceptions on POWER architecture only save state to HSRR0/HSRR1.
Until we have bhyve on POWER, use a lightweight exception frontend which copies
HSRR0/HSRR1 into SRR0/SRR1, and run the normal trap handler.

The first user of this is the Hypervisor Virtualization Interrupt, which targets
the XIVE interrupt controller on POWER9.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15487
2018-05-19 04:21:50 +00:00
mmacy
a42e239a05 cpuset_thread0: avoid unused assignment on non debug build 2018-05-19 04:14:00 +00:00
mmacy
07e1c3def4 make_dev: avoid unused assignments on non debug builds 2018-05-19 04:13:20 +00:00
mmacy
77a3ff4fe0 mqueue: avoid unused variables 2018-05-19 04:10:53 +00:00
mmacy
71ee67e907 physio: avoid uninitialized variables 2018-05-19 04:09:58 +00:00
mmacy
0cad561f8c cache_lookup remove unused variable and initialize used 2018-05-19 04:08:11 +00:00
mmacy
e1c41612d0 filt_timerdetach: only assign to old if we're going to check it in
a KASSERT
2018-05-19 04:07:00 +00:00
mmacy
ae3e2f4e32 getnextevent: put variable only used by KTR under ifdef KTR 2018-05-19 04:05:36 +00:00
mmacy
1edae3372d 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
mmacy
3b202e89e0 tty: conditionally assign to ret value only used by MPASS statement 2018-05-19 04:02:29 +00:00
jhibbits
d02acb9927 powerpc64: Add OPAL definitions
Summary:
Add additional OPAL PCI definitions and expand the code to use them in order to
ease the OPAL interface process for new comers.

These definitions came directly from the OPAL code and they are the same for
both PHB3 (POWER8) and PHB4 (POWER9).

Submitted by:	Breno Leitao
Differential Revision: https://reviews.freebsd.org/D15432
2018-05-19 04:01:15 +00:00
mmacy
130d8ea8de remove unused locked variable in lockmgr_unlock_fast_path 2018-05-19 03:58:40 +00:00
mmacy
ac52916f52 signotify: don't create a stack local that isn't used on non-debug builds 2018-05-19 03:57:41 +00:00
mmacy
1a9d954f7e sysv_msg initialize saved_msgsz 2018-05-19 03:56:39 +00:00
mmacy
9adfff2b18 remove unused variable 2018-05-19 03:55:42 +00:00
mmacy
0c8764214e fix uninitialized variable warning in reader locks 2018-05-19 03:52:55 +00:00
mmacy
35c4eb3fff add DBGSET macro to conditionally assign to a variable depending on INVARIANTS 2018-05-19 03:50:29 +00:00
mmacy
350f657795 fix uninitialized variable warning 2018-05-19 03:49:36 +00:00
mmacy
dcf6fa9422 sys_process.c fix set but not used warning 2018-05-19 03:48:35 +00:00
mmacy
edbaf8fc62 subr_epoch.c fix unused variable warnings 2018-05-19 03:47:37 +00:00
jhibbits
bf8692e041 Fix a manual copy from the original diff for r333825
The 'else' was in the original diff.

Submitted by:	Breno Leitao
2018-05-19 03:47:28 +00:00
jhibbits
895c0483ab Add yet another option for gathering available memory
On some POWER9 systems, 'reg' denotes the full memory in the system, while
'linux,usable-memory' denotes the usable memory.  Some memory is reserved for
NVLink usage, so is partitioned off.

Submitted by:	Breno Leitao
2018-05-19 03:45:38 +00:00
jhibbits
c804777c4e Add some Hypervisor interrupt definitions
This mostly completes the interrupt definitions.  There are still some left out,
less likely to be used in the near term.
2018-05-19 03:23:46 +00:00
mmacy
79dec8cde3 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
mmacy
092fac4e4a 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
mmacy
d5878b87ff Silence non-actionable warnings in vendor code
We can't modify vendor code so there's no signal in warnings from it.
Similarly -Waddress-of-packed-member is not useful on networking code
as access to packed structures is fundamental to its operation.
2018-05-19 00:04:01 +00:00
mmacy
2a73e755ac Annotate td_pre_epoch_prio in struct thread
Reported by:	jhb
2018-05-18 23:17:49 +00:00
mjg
9507177d38 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
trasz
27b7f19894 Stop claiming the device-side USB serial interfaces talk Hayes AT.
There should be no functional difference.

Reviewed by:	hselasky@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-18 20:24:19 +00:00
mmacy
7aeac9ef18 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
jhb
000432bf10 Be more robust against garbage input on a TOE TLS TX socket.
If a socket is closed or shutdown and a partial record (or what
appears to be a partial record) is waiting in the socket buffer,
discard the partial record and close the connection rather than
waiting forever for the rest of the record.

Reported by:	Harsh Jain @ Chelsio
Sponsored by:	Chelsio Communications
2018-05-18 19:09:11 +00:00
mmacy
9f0d447325 epoch(9): allocate net epochs earlier in boot 2018-05-18 18:48:00 +00:00
mmacy
49ea7f0046 epoch(9): assert that epoch is allocated post-configure 2018-05-18 18:27:17 +00:00
mmacy
2f5a774893 epoch: move epoch variables to read mostly section 2018-05-18 17:58:15 +00:00
emaste
f0cc1a044c 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
emaste
0c5a9cf17f amd64 GENERIC: correct whitespace on smartpqi entry 2018-05-18 17:51:42 +00:00
mmacy
a48d80f193 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
sbruno
4149673036 Quiesce a couple pages of clang warnings with a cast. Duplicates
linux maintainer commit:

627871b71c (diff-8c6ddb4c3ad69a6fb9f289475821db56)

ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
  to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
  [-Wconstant-conversion]
            /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
                                              ^~~~~~~~~~~~~~~~~~
ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
    (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15476
2018-05-18 17:23:23 +00:00
emaste
07b7de622b muge(4): style and comment cleanup
And tag some spots to revisit with XXX.

Sponsored by:	The FreeBSD Foundation
2018-05-18 17:07:59 +00:00
markj
7d33bd5057 Don't increment addl_page_shortage for wired pages.
Such pages are dequeued as they're encountered during the inactive queue
scan, so by the time we get to the active queue scan, they should have
already been subtracted from the inactive queue length.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D15479
2018-05-18 16:59:58 +00:00
emaste
6b804a1b7f muge(4): sync register names with Microchip's lan7800.h
Microchip provided a permissively-licensed lan78xx header, which has
an 'ETH_' prefix on most definitions.  Follow suit in our driver.

Sponsored by:	The FreeBSD Foundation
2018-05-18 14:30:45 +00:00
sbruno
ddf8a5af4d bnxt(4)
- Fix HWRM warning message during HW LRO configuration.

Submitted by:	bhargava.marreddy@broadcom.com
MFC after:	1 week
Sponsored by:	Broadcom Limited
Differential Revision:	https://reviews.freebsd.org/D15466
2018-05-18 13:49:12 +00:00
cognet
a92d244906 Instead of ignoring the VFP registers, set the dumppcb's pcb_fpusaved
field, so that they are saved, as they may be used in the kernel, in the
EFI and the crypto code.

Reviewed by:	andrew
2018-05-18 13:28:02 +00:00
andrew
359ac3e429 Enable the Qualcomm MSM UART driver. This is needed for some Qualcomm
Snapdragon SoCs.

Obtained from:	ABT Systems Ltd
Sponsored by:	Turing Robotic Industries
2018-05-18 11:32:48 +00:00
mjg
996b0b6d81 amd64: tweak the read_frequently section
1. align to 128 bytes to avoid possible waste from the preceeding section
2. sort entries by alignment SORT_BY_ALIGNMENT, plugging the holes (most
entries are one byte in size, but they got interleaved with bigger ones)

Interestingly I was looking for a feature of the sort earlier and failed
to find it. It turns out the script was already utilizing sorting in other
places, so shame on me.

Thanks for Travis Geiselbrecht for pointing me at the feature.
2018-05-18 07:31:26 +00:00
np
c37e5ffeae cxgbe(4): Implement ifnet callbacks that deal with send tags.
An etid (ethoffload tid) is allocated for a send tag and it acquires a
reference on the traffic class that matches the send parameters
associated with the tag.

Sponsored by:	Chelsio Communications
2018-05-18 06:09:15 +00:00
mmacy
98af9f469b netmap: pull fix for 32-bit support from upstream
Approved by:	sbruno
2018-05-18 03:38:17 +00:00