Commit Graph

232648 Commits

Author SHA1 Message Date
Matt Macy
e5ae3af78b disable set but not used on code that can't be changed 2018-05-19 04:46:34 +00:00
Matt Macy
5072a5f465 malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined 2018-05-19 04:43:49 +00:00
Justin Hibbits
5321c01b50 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
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
Justin Hibbits
30f3b0f5f7 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
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
f1b2eaf13b add DBGSET macro to conditionally assign to a variable depending on INVARIANTS 2018-05-19 03:50:29 +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
Justin Hibbits
c07c77a311 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
Justin Hibbits
876f3b9295 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
Justin Hibbits
829c98b82e 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
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
Simon J. Gerraty
494f719155 Merge bmake-20180512
Skip polling job token pipe,
better handle sysV style includes with variables.
2018-05-19 00:26:00 +00:00
Matt Macy
cccc969bc7 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
Matt Macy
3f25f5fbe5 Annotate td_pre_epoch_prio in struct thread
Reported by:	jhb
2018-05-18 23:17:49 +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
Edward Tomasz Napierala
6b7e508c4a 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
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
Simon J. Gerraty
a5422567f9 Import bmake-20180512
Of relevance:

  o job.c: skip polling job token pipe
  o parse.c: be more cautious about detecting depenency line
    rather than sysV style include.

also in mk:

* dirdeps.mk: include local.dirdeps-build.mk when .MAKE.LEVEL > 0
  ie. we are building something.
* FILES: add dirdeps-options.mk to deal with optional DIRDEPS.
* ldorder.mk: describe how to use LDORDER_EXTERN_BARRIER
  if needed.
2018-05-18 19:49:54 +00:00
John Baldwin
24ddd0ec9c 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
Matt Macy
f2d19f98c1 epoch(9): allocate net epochs earlier in boot 2018-05-18 18:48:00 +00:00
Matt Macy
20ba6811e6 epoch(9): assert that epoch is allocated post-configure 2018-05-18 18:27:17 +00:00
Matt Macy
d71e30de40 epoch: move epoch variables to read mostly section 2018-05-18 17:58:15 +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
Ed Maste
3dc3b1235a amd64 GENERIC: correct whitespace on smartpqi entry 2018-05-18 17:51:42 +00:00
Nathan Whitehorn
fb4f0dcae9 Use sysrc(8) in the documentation rather than echoing things to rc.conf
in order to encourage good habits.

PR:		228325
Submitted by:	Mateusz Piotrowski
MFC after:	2 weeks
2018-05-18 17:46:40 +00:00
Nathan Whitehorn
8c7de243f4 Fix math error in the computation of the free space after the last partition
on a disk. This resulted in one sector always remaining free at the end.

PR:		bin/228322
Submitted by:	Rikiya Yonemoto
MFC after:	2 weeks
2018-05-18 17:43:15 +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
Sean Bruno
1696e1f2b8 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
Ed Maste
e5151258c8 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
Mark Johnston
01f04471f4 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
Warner Losh
1916d3b499 Based on multiple sources including the State Gazette the last day of
Julian calendar in Bulgaria was 31.03.1916.

Submitted by: Konstantin Terziev
Pull Request: https://github.com/freebsd/freebsd/pull/142

(I independently confirmed the date and this was the right date to use for ncal)
2018-05-18 16:19:45 +00:00
Ed Maste
48bc175842 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
Andrew Gallatin
b4cc08389a Teach pmcannotate about $TMPDIR and _PATH_TMP
Convert pmcannotate to using $TMPDIR and _PATH_TMP rather than hard
coding /tmp for temporary files.  Pmcannotate sometimes needs quite a
lot of space to store the output from objdump, and will fail in odd
ways if that output is truncated due to lack of space in /tmp.

Reviewed by:	jtl
Sponsored by:	Netflix
2018-05-18 14:14:04 +00:00
Sean Bruno
f097a19eab 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