r339618 tijl Oct. 22, 2018, 8:55 p.m.
Currently the compiler picks up the definition in machine/cpufunc.h.

Add compiler memory barriers to read* and write*.  The Linux x86
implementation of these functions uses inline asm with "memory" clobber.
The Linux x86 implementation of read_relaxed* and write_relaxed* uses the
same inline asm without "memory" clobber.

Implement ioread* and iowrite* in terms of read* and write* so they also
have memory barriers.

Qualify the addr parameter in write* as volatile.

Like Linux, define macros with the same name as the inline functions.

Only define 64-bit versions on 64-bit architectures because generally
32-bit architectures can't do atomic 64-bit loads and stores.

Regroup the functions a bit and add brief comments explaining what they do:
- __raw_read*, __raw_write*: atomic, no barriers, no byte swapping
- read_relaxed*, write_relaxed*: atomic, no barriers, little-endian
- read*, write*: atomic, with barriers, little-endian

Add a comment that says our implementation of ioread* and iowrite*
only handles MMIO and does not support port IO.

Reviewed by:	hselasky
MFC after:	3 days
ViewVC
r339617 cem Oct. 22, 2018, 8:22 p.m.
"svn merge --record-only svn+ssh://repo.freebsd.org/base/vendor/zstd/dist"

Reported by:	jhb, markj
Sponsored by:	Dell EMC Isilon
ViewVC
r339616 markj Oct. 22, 2018, 8:13 p.m.
This provides a chicken switch for anyone negatively impacted by
enabling NUMA in the amd64 GENERIC kernel configuration.  With
NUMA disabled at boot-time, information about the NUMA topology
is not exposed to the rest of the kernel, and all of physical
memory is viewed as coming from a single domain.

This method still has some performance overhead relative to disabling
NUMA support at compile time.

PR:		231460
Reviewed by:	alc, gallatin, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17439
ViewVC
r339609 emaste Oct. 22, 2018, 7:39 p.m.
Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D17651
ViewVC
r339608 emaste Oct. 22, 2018, 6:41 p.m.
r339607 emaste Oct. 22, 2018, 6:40 p.m.
Our dependency tracking cannot directly cope with certain source tree
changes, particularly with respect to removing or moving source files or
replacing generated files.  We have a collection of ad-hoc workarounds
to handle these cases.  As there is a (small) build-time cost inherent
in these workarounds, we do not want to keep them indefinitely.  Thus,
remove workarounds from 2017.

Sponsored by:	The FreeBSD Foundation
ViewVC
r339606 cem Oct. 22, 2018, 6:29 p.m.
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
ViewVC
r339605 cem Oct. 22, 2018, 5:42 p.m.
Fix tinderbox (mips XLPN32) after r339471.

Reported by:	tinderbox
X-MFC-With:	r339471
Sponsored by:	Dell EMC Isilon
ViewVC
r339603 markj Oct. 22, 2018, 5:19 p.m.
I committed some patches out of order and didn't build-test one of them.

Reported by:	Jenkins, O. Hartmann <ohartmann@walstatt.org>
X-MFC with:	r339601
ViewVC
r339602 markj Oct. 22, 2018, 5:17 p.m.
Reported by:	alc
X-MFC with:	r339601
ViewVC
r339601 markj Oct. 22, 2018, 5:04 p.m.
On NUMA systems, we would not swap in processes unless all domains
had some free pages.  This is too conservative in general.  Instead,
permit swapins so long as at least one domain has free pages, and add
a kernel stack NUMA policy which ensures that we will try to allocate
kernel stack pages from any domain.

Reported and tested by:	pho, Jan Bramkamp <crest@bultmann.eu>
Reviewed by:	alc, kib
Discussed with:	jeff
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17304
ViewVC
r339600 hselasky Oct. 22, 2018, 4:21 p.m.
While at it fix a print: Unsigned types cannot be negative.

Reviewed by:		kib, mjg
Differential revision:	https://reviews.freebsd.org/D17616
MFC after:		1 week
Sponsored by:		Mellanox Technologies
ViewVC
r339599 markj Oct. 22, 2018, 4:16 p.m.
vmem uses UMA cache zones to implement the quantum cache.  Since
uma_zalloc() returns 0 (NULL) to signal an allocation failure, UMA
should not be used to cache resource 0.  Fix this by ensuring that 0 is
never cached in UMA in the first place, and by modifying vmem_alloc()
to fall back to a search of the free lists if the cache is depleted,
rather than blocking in qc_import().

Reported by and discussed with:	Brett Gutstein <bgutstein@rice.edu>
Reviewed by:	alc
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D17483
ViewVC
r339598 markj Oct. 22, 2018, 4:09 p.m.
This should have been a part of r338470.  No functional changes
intended.

Reported by:	gallatin
Reviewed by:	gallatin, Johannes Lundberg <johalun0@gmail.com>
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17109
ViewVC
r339596 glebius Oct. 22, 2018, 3:48 p.m.
cache, then we put new bucket on generic bucket cache. However, code didn't
honor UMA_ZONE_NOBUCKETCACHE flag, so potentially we could start a cache
on a zone that clearly forbids that. Fix this.

Reviewed by:	markj
ViewVC