Commit Graph

244993 Commits

Author SHA1 Message Date
Conrad Meyer
46d70077be ddb: Add CSV option, sorting to 'show (malloc|uma)'
Add /i option for machine-parseable CSV output.  This allows ready copy/
pasting into more sophisticated tooling outside of DDB.

Add total zone size ("Memory Use") as a new column for UMA.

For both, sort the displayed list on size (print the largest zones/types
first).  This is handy for quickly diagnosing "where has my memory gone?" at
a high level.

Submitted by:	Emily Pettigrew <Emily.Pettigrew AT isilon.com> (earlier version)
Sponsored by:	Dell EMC Isilon
2019-10-11 01:31:31 +00:00
Gleb Smirnoff
2b60ecf197 Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead. 2019-10-10 23:55:33 +00:00
Gleb Smirnoff
45c1d51c39 Don't use if_maddr_rlock() in sppp(4), use epoch(9) directly instead. 2019-10-10 23:54:37 +00:00
Gleb Smirnoff
73c96bbeac Don't use if_maddr_rlock() in tuntap(4), use epoch(9) directly instead. 2019-10-10 23:51:14 +00:00
Gleb Smirnoff
4b24e5b1ef Interface output method must be executed in network epoch, so if_addr_rlock()
isn't needed here.
2019-10-10 23:50:32 +00:00
Gleb Smirnoff
ebded7d547 Don't use if_maddr_rlock() in ng_eiface(4), use epoch(9) directly instead. 2019-10-10 23:49:19 +00:00
Gleb Smirnoff
1e5db73d07 The divert(4) module must always be running in network epoch, thus
call to if_addr_rlock() isn't needed.
2019-10-10 23:48:42 +00:00
Gleb Smirnoff
57985d11b4 Don't use if_maddr_rlock() in ng_ether(4), use epoch(9) directly instead. 2019-10-10 23:47:14 +00:00
Gleb Smirnoff
fb3fc771f6 Add two extra functions that basically give count of addresses
on interface.  Such function could been implemented on top of
the if_foreach_llm?addr(), but several drivers need counting,
so avoid copy-n-paste inside the drivers.
2019-10-10 23:44:56 +00:00
Gleb Smirnoff
826857c833 Provide new KPI for network drivers to access lists of interface
addresses.  The KPI doesn't reveal neither how addresses are stored,
how the access to them is synchronized, neither reveal struct ifaddr
and struct ifmaddr.

Reviewed by:	gallatin, erj, hselasky, philip, stevek
Differential Revision:	https://reviews.freebsd.org/D21943
2019-10-10 23:42:55 +00:00
Conrad Meyer
515013704d nvdimm(4): Calculate and save memattr once; it never changes
Refactor nvdimm_spa_memattr() routine and callers to just save the value at
initialization and use the value directly.  The reference value from NFIT,
MemoryMapping, is read only once, so the associated memattr could never
change.

No functional change.

Sponsored by:	Dell EMC Isilon
2019-10-10 22:49:45 +00:00
Dimitry Andric
390ceeb437 Pull in r374444 from upstream lldb trunk (by me):
Fix process launch failure on FreeBSD after r365761

  Summary:
  After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS`
  enabled, launching any process on FreeBSD crashes lldb with:

  ```
  Expected<T> must be checked before access or destruction.
  Expected<T> value was in success state. (Note: Expected<T> values in
  success mode must still be checked prior to being destroyed).
  ```

  This is because `m_operation_thread` and `m_monitor_thread` were
  wrapped in `llvm::Expected<>`, but this requires the objects to be
  correctly initialized before accessing them.

  To fix the crashes, use `llvm::Optional<>` for the members (as
  indicated by labath), and use local variables to store the return
  values of `LaunchThread` and `StartMonitoringChildProcess`.  Then,
  only assign to the member variables after checking if the return
  values indicated success.

  Reviewers: devnexen, emaste, MaskRay, mgorny

  Reviewed By: devnexen

  Subscribers: jfb, labath, krytarowski, lldb-commits

  Differential Revision: https://reviews.llvm.org/D68723

PR:		241137
MFC after:	1 month
X-MFC-With:	r353358
2019-10-10 20:33:55 +00:00
Dimitry Andric
6cc0992fb5 Revert r353363 in preparation for applying upstream fix:
Put in a band-aid fix for lldb 9 exiting with "Expected<T> must be
checked before access or destruction" when launching executables, while
we sort this out with upstream.

PR:		241137
MFC after:	1 month
X-MFC-With:	r353358
2019-10-10 20:30:54 +00:00
Konstantin Belousov
302abfb279 Typo out->in.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2019-10-10 18:52:24 +00:00
Brooks Davis
a1ff92a580 Fix -DNO_CLEAN build across r353340 and r353381
opensolaris_atomic.S is now only used on i386 with opensolaris_atomic.c
used on other platforms.  After r353381 it doesn't exist on those
platforms so the stale dependency would result in a build error.
2019-10-10 16:29:13 +00:00
Ruslan Bukin
e047b568fb Remove a stale file left after merging.
Sponsored by:	DARPA, AFRL
2019-10-10 13:44:12 +00:00
Ruslan Bukin
fc5020859f Update ARM CoreSight trace decoder library.
Its latest version merged from:
^/vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca

Sponsored by:	DARPA, AFRL
2019-10-10 13:30:13 +00:00
Ruslan Bukin
85f87cf491 Update Intel Processor Trace decoder library.
Its latest version merged from:
^/vendor/processor-trace/892e12c5a27bda5806d1e63269986bb4171b5a8b

Sponsored by:	DARPA, AFRL
2019-10-10 12:46:34 +00:00
Andriy Gapon
93d9a79816 remove unrelated files accidentally committed in r353381 2019-10-10 07:41:42 +00:00
Andriy Gapon
d0c0856f63 emulate illumos membar_producer with atomic_thread_fence_rel
membar_producer is supposed to be a store-store barrier.
Also, in the code that FreeBSD has ported from illumos membar_producer
is used only with regular stores to regular memory (with respect to
caching).

We do not have an MI primitive for the store-store barrier, so
atomic_thread_fence_rel is the closest we have as it provides
(load | store) -> store barrier.

Previously, membar_producer was an empty function call on all 32-bit
arm-s, 32-bit powerpc, riscv and all mips variants.  I think that it was
inadequate.
On other platforms, such as amd64, arm64, i386, powerpc64, sparc64,
membar_producer was implemented using stronger primitives than required
for a store-store barrier with respect to regular memory access.
For example, it used sfence on amd64 and lock-ed nop in i386 (despite TSO).
On powerpc64 we now use recommended lwsync instead of eieio.
On sparc64 FreeBSD uses TSO mode.
On arm64/aarch64 we now use dmb sy instead of dmb ish.  Not sure if this
is an improvement, actually.

After this change we can drop opensolaris_atomic.S for aarch64, amd64,
powerpc64 and sparc64 as all required atomic operations have either
direct or light-weight mapping to FreeBSD native atomic operations.

Discussed with:	kib
MFC after:	4 weeks
2019-10-10 07:39:41 +00:00
Doug Ambrisko
f2521a76ed This driver attaches to the Intel VMD drive and connects a new PCI domain
starting at the max. domain, and then work down.  Then existing FreeBSD
drivers will attach.  Interrupt routing from the VMD MSI-X to the NVME
drive is not well known, so any interrupt is sent to all children that
register.

VROC used Intel meta data so graid(8) works with it. However, graid(8)
supports RAID 0,1,10 for read and write. I have some early code to
support writes with RAID 5.  Note that RAID 5 can have life issues
with SSDs since it can cause write amplification from updating the parity
data.

Hot plug support needs a change to skip the following check to work:
	if (pcib_request_feature(dev, PCI_FEATURE_HP) != 0) {
in sys/dev/pci/pci_pci.c.

Looked at by: imp, rpokala, bcr
Differential Revision:	https://reviews.freebsd.org/D21383
2019-10-10 03:12:17 +00:00
Alan Somers
e2032bdaaa zfs: multiple improvements to the zpool_add tests
* Don't partition a disk if too few are available.  Just rely on Kyua to
  ensure that the tests aren't run with insufficient disks.

* Remove redundant cleanup steps

* In zpool_add_003_pos, store the temporary file in $PWD so Kyua will
  automatically clean it up.

* Update zpool_add_005_pos to use dumpon instead of dumpadm.  This test had
  never been ported to FreeBSD.

* In zpool_add_005_pos, don't format the dump disk with UFS.  That was
  pointless.

MFC after:	2 weeks
Sponsored by:	Axcient
2019-10-10 02:17:45 +00:00
John Baldwin
22fc8564bc Add opt_kern_tls.h to the sources from t4_tom.ko.
Missed in r353328.

Sponsored by:	Chelsio Communications
2019-10-09 23:35:42 +00:00
John-Mark Gurney
dbc25ee8e8 document how to apply altq to vlan interfaces w/ pf.
Thanks to jhb for pointing out that this might possibly work.

PR:		94182
2019-10-09 21:48:00 +00:00
Warner Losh
5bc9524c7d Add note about universe changes to arch and the need to add
MAKE_OBSOLETE_GCC to get old behavior on universe.
2019-10-09 21:45:40 +00:00
Warner Losh
55b92c5ffa Add UPDATING entry for universe changes
Suggested by: emaste@
2019-10-09 21:45:34 +00:00
John Baldwin
97ecf6efa0 Don't free the cursor boundary tag during vmem_destroy().
The cursor boundary tag is statically allocated in the vmem instead of
from the vmem_bt_zone.  Explicitly remove it from the vmem's segment
list in vmem_destroy before freeing all the segments from the vmem.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D21953
2019-10-09 21:20:39 +00:00
Warner Losh
2f9520d5fe Wordsmith and simplify
Simplify expressions as suggested by jhb. The extra indirection made
sense in earlier versions of this patch, but not the final one.

While here, apply suggestion from emaste for wording of universe.
Also wordsmith awkwardly worded comment about when we effectively
neuter the universe build for an architecture.

Once llvm 9.0 has been vetted for mips and powerpc, I'll take them out
of these lists.
2019-10-09 21:18:46 +00:00
John Baldwin
b60229e2f1 Remove adapters from t4_list earlier during detach.
This ensures the clip task won't race with t4_destroy_clip_table.

While here, make some mutex destroys unconditional since attach always
initializes them.

Reviewed by:	np
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D21952
2019-10-09 21:08:51 +00:00
Warner Losh
b23b156e2e Fix casting error from newer gcc
Cast the pointers to (uintptr_t) before assigning to type
uint64_t. This eliminates an error from gcc when we cast the pointer
to a larger integer type.
2019-10-09 21:02:06 +00:00
Warner Losh
3f376e4b54 Don't compile old gcc 4.2.1 archs by default in universe/tinderbox.
Only compile clang supporting architectures of amd64, arm, arm64,
i386, and riscv as part of universe. Compile the other architectures
if MAKE_OBSOLETE_GCC is defined. In all cases, explicit lists of
architectures in TARGETS= on the command line override.

For mips, powerpc and sparc64, do the same thing we do for risvc when
MAKE_OBSOLETE_GCC isn't defined and short-circuit their universe build
with an echo saying to install the xtoolchain port or pkg.

PR: 241134
Discussed on: arch@ (https://lists.freebsd.org/pipermail/freebsd-arch/2019-August/019674.html)
Differential Revision: https://reviews.freebsd.org/D21942
2019-10-09 20:59:10 +00:00
Alan Somers
d2cb9c7641 ZFS: fix the zpool_add_010_pos test
The test is necessarily racy, because it depends on being able to complete a
"zpool add" before a previous resilver finishes.  But it was racier than it
needed to be.  Move the first "zpool add" to before the resilver starts.

MFC after:	2 weeks
Sponsored by:	Axcient
2019-10-09 20:16:40 +00:00
Jeremie Le Hen
eadfb49fe1 Add a missing macro for the previous commit (IS_INADDR_ANY()). 2019-10-09 20:05:14 +00:00
Jeremie Le Hen
b9eabd15fd Use inet_ntop(3) instead of inet_ntoa(3) for AF_INET socket details.
This also makes the code closer to the one used for AF_INET6.
2019-10-09 20:01:23 +00:00
Dimitry Andric
a930ecddaa Put in a band-aid fix for lldb 9 exiting with "Expected<T> must be
checked before access or destruction" when launching executables, while
we sort this out with upstream.

Reported by:	jbeich
PR:		241137
MFC after:	1 month
X-MFC-With:	r353358
2019-10-09 19:51:41 +00:00
Edward Tomasz Napierala
2c7cf9a3c2 Fix the compilation workaround so it's not entirely dead code - clang
also defines __GNUC__.

Submitted by:	cem
Sponsored by:	Klara Inc, Netflix
2019-10-09 18:46:56 +00:00
Alan Somers
86b90d9179 ZFS: in the tests, don't override PWD
The ZFS test suite was overriding the common $PWD variable with the path to
the pwd command, even though no test wanted to use it that way.  Most tests
didn't notice, because ksh93 eventually restored it to its proper meaning.

MFC after:	2 weeks
Sponsored by:	Axcient
2019-10-09 17:36:57 +00:00
Alan Somers
560c0f4573 ZFS: multiple fixes to the zpool_import tests
* Don't create a UFS mountpoint just to store some temporary files.  The
  tests should always be executed with a sufficiently large TMPDIR.
  Creating the UFS mountpoint is not only unneccessary, but it slowed
  zpool_import_missing_002_pos greatly, because that test moves large files
  between TMPDIR and the UFS mountpoint.  This change also allows many of
  the tests to be executed with just a single test disk, instead of two.

* Move zpool_import_missing_002_pos's backup device dir from / to $PWD to
  prevent cross-device moves.  On my system, these two changes improved that
  test's speed by 39x.  It should also prevent ENOSPC errors seen in CI.

* If insufficient disks are available, don't try to partition one of them.
  Just rely on Kyua to skip the test.  Users who care will configure Kyua
  with sufficient disks.

MFC after:	2 weeks
Sponsored by:	Axcient
2019-10-09 17:24:09 +00:00
Hans Petter Selasky
eabddb25a3 Factor out TCP rateset destruction code.
Ensure the epoch_call() function is not called more than one time
before the callback has been executed, by always checking the
RS_FUNERAL_SCHD flag before invoking epoch_call().

The "rs_number_dead" is balanced again after r353353.

Discussed with:	rrs@
Sponsored by:	Mellanox Technologies
2019-10-09 17:08:40 +00:00
Dimitry Andric
38c0ca1481 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.0 final release r372316.

Release notes for llvm, clang, lld and libc++ 9.0.0 are available here:

https://releases.llvm.org/9.0.0/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.0/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.0/projects/libcxx/docs/ReleaseNotes.html

PR:		240629
MFC after:	1 month
2019-10-09 17:06:56 +00:00
Gleb Smirnoff
0732ac0eff Revert most of the multicast changes from r353292. This needs a more
accurate approach.
2019-10-09 17:03:20 +00:00
Gleb Smirnoff
1e4f4e56b9 ip6_output() has a complex set of gotos, and some can jump out of
the epoch section towards return statement. Since entering epoch
is cheap, it is easier to cover the whole function with epoch,
rather than try to properly maintain its state.
2019-10-09 17:02:28 +00:00
Gleb Smirnoff
975b8f8462 Cleanup unneeded includes that crept in with r353292. 2019-10-09 16:59:42 +00:00
Emmanuel Vadot
e3014a572e dwmmc: Reset the dma controller at attach
If the bootloader enabled DMA we need to fully reset the DMA controller
otherwise we might have some stale data in it that provoke weird
behavior.

MFC after:	1 week
2019-10-09 16:57:14 +00:00
Hans Petter Selasky
24be13533b Fix locking order reversal in the TCP ratelimit code by moving
destructors outside the rsmtx mutex.

Witness message:
lock order reversal: (sleepable after non-sleepable)
   1st tcp_rs_mtx (rsmtx) @ sys/netinet/tcp_ratelimit.c:242
   2nd sysctl lock (sysctl lock) @ sys/kern/kern_sysctl.c:607

Backtrace:
witness_debugger
witness_checkorder
_rm_wlock_debug
sysctl_ctx_free
rs_destroy
epoch_call_task
gtaskqueue_run_locked
gtaskqueue_thread_loop

Discussed with:	rrs@
Sponsored by:	Mellanox Technologies
2019-10-09 16:48:48 +00:00
Dimitry Andric
9122aeeaa6 Merge ^/head r353316 through r353350. 2019-10-09 16:40:22 +00:00
Gleb Smirnoff
caeeeaa7c5 ifnet_byindex_ref() requires network epoch. 2019-10-09 16:21:50 +00:00
Gleb Smirnoff
ff3cfc330e Enter network epoch in domain callouts. 2019-10-09 16:21:05 +00:00
Glen Barber
013f1782dd Connect the libucl(3) manual page to the build.
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2019-10-09 15:35:22 +00:00
Eric van Gyzen
83b82cd48c Add CTLFLAG_STATS to the dev.ioat.N.stats sysctl OIDs
Refer to r353111.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2019-10-09 12:14:10 +00:00