Commit Graph

266380 Commits

Author SHA1 Message Date
Warner Losh
3c22b4f832 vmstat: correct history
vmstat dates back to 3BSD, but wasn't in 32V nor the 7th edition. It
does not seem to have been in AT&T's commercial offerings at all.

Sponsored by:		Netflix
2021-06-21 08:40:54 -06:00
Warner Losh
f394c73666 basename: fix history
Basename(1) first appeared in the 7th edition. It was not in the 6th
edition, or PWB releases. It's on all the subsequent descendants.

Dirname(1) first appeared in System III, and was later picked up in
4.3-Reno and 8th edition research unix (though was not in 4.1BSD where
the bulk of 8th edition came from). In System III and V8 it was a shell
script, though the BSD version is in C.

Sponsored by:		Netflix
2021-06-21 08:40:54 -06:00
Andriy Gapon
7544c1d20d rtwn: make sure to not write in upper bits of txdseq
ni_txseqs is kept as 16-bit counter, but we need to trim the upper four
bits as they may have special meanings for the firmware / hardware.
For instance, bit 15 enables hardware / firmware generation of sequence
numbers that overrides sequence numbers programmed by the driver.

Reviewed by:	adrian
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D30814
2021-06-21 11:05:04 +03:00
Colin Percival
313724bab9 loader: Use tslog to instrument some functions
In my initial testing, these are the functions which showed up as
being worth instrumenting.  More may be added later.

common/console.c: cons_probe
common/gfx_fb.c: read_list, insert_font, autoload_font
common/interp.c: interact
common/interp_lua.c: interp_init, interp_run
efi/libefi/efipart.c: efipart_readwrite
i386/libi386/biosdisk.c: bd_init, bd_open, bd_edd_io, bd_chs_io, bd_io
libsa/open.c: open
libsa/read.c: read
libsa/twiddle.c: twiddle

Note that profiling interp_run may be of questionable utility as it
may depend on user behaviour (e.g. pressing keys).

Reviewed by:	kevans (earlier version)
2021-06-20 20:09:48 -07:00
Colin Percival
fe51b5a76d kern_tslog: Include tslog data from loader
The i386 loader (and hopefully others to come) now passes tslog data
as a "preloaded module".  Include this in the data returned by the
debug.tslog sysctl.

Reviewed by:	kevans
2021-06-20 20:09:47 -07:00
Colin Percival
537a44bf28 stand/common command_boot: Pass tslog to kernel
Pass the recorded tslog buffer to the kernel as a "preloaded module".

Reviewed by:	kevans
2021-06-20 20:09:46 -07:00
Colin Percival
f49381ccb6 efi/loader: Call tslog_init
This allows the EFI loader to start recording timestamps.
2021-06-20 20:09:45 -07:00
Colin Percival
c4b65e954f i386/loader: Call tslog_init
This allows the i386 loader to start recording timestamps.

Reviewed by:	kevans
2021-06-20 20:09:44 -07:00
Colin Percival
c8dfc327db stand/common: Add support for timestamp logging (tslog)
This adds tslog_init, which allocates a 2MB buffer for recording
timestamped events; and tslog_publish, which takes the buffer and
passes it to the kernel as a "preloaded module".  These functions
will be used in a later commit.

Reviewed by:	kevans
2021-06-20 20:09:43 -07:00
Colin Percival
e193d3ba33 libsa: Add support for timestamp logging (tslog)
At present this only supports x86, due to the use of the rdtsc
instruction; and is inert unless a buffer is allocated and passed to
the tslog code (which will be done by a future commit).

Reviewed by:	kevans
2021-06-20 20:09:42 -07:00
Colin Percival
60a978bec9 stand/common: Add file_addbuf()
This provides an interface for a memory buffer to be passed from the loader
to the kernel as a "preloaded module".

Reviewed by:	kevans
2021-06-20 20:09:41 -07:00
Warner Losh
4afa62be71 cam: Set the CAM_QOS_VALID when valid
When the elapsed time of the operation is complete and stored in the QOS
field, set the CAM_QOS_VALID bit.  In iosched, test to make sure it's
set before using it.

Sponsored by:		Netflix
2021-06-20 19:14:13 -06:00
Mike Karels
13604fb0fd genet: Fix potential crash during attach
As pointed out in the bug, the genet driver (RPi4 Ethernet) was
attaching the interrupts before the data structures were fully
initialized, causing a crash if an interrupt came in during the
attach.  Fix by reordering code blocks.

PR:		256334
Reported by:	< ghuckriede at blackberry.com >
Reviewed by:	< ghuckriede at blackberry.com > (informally)
MFC after:	3 days
2021-06-20 11:17:13 -05:00
Martin Matuska
9d1cafb304 zfs: add version update missing in 0d8fe2373 2021-06-20 10:04:52 +02:00
Martin Matuska
0d8fe23735 zfs: merge openzfs/zfs@c4c162c1e (master) into main
Notable upstream pull request merges:
  #12054 Avoid deadlock when removing L2ARC devices under I/O
  #12172 Use wmsum for arc, abd, dbuf and zfetch statistics
  #12221 vdev_draid_min_asize() ignores reserved space

Obtained from:	OpenZFS
OpenZFS commit:	c4c162c1e8
2021-06-20 09:18:44 +02:00
Alan Somers
5403f2c163 fusefs: ensure that FUSE ops' headers' unique values are actually unique
Every FUSE operation has a unique value in its header.  As the name
implies, these values are supposed to be unique among all outstanding
operations.  And since FUSE_INTERRUPT is asynchronous and racy, it is
desirable that the unique values be unique among all operations that are
"close in time".

Ensure that they are actually unique by incrementing them whenever we
reuse a fuse_dispatcher object, for example during fsync, write, and
listextattr.

PR:		244686
MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D30810
2021-06-19 14:45:29 -06:00
Alan Somers
77b040c993 fusefs: also debug INIT operations in the test suite
MFC after:	2 weeks
Reviewed by:	pfg
2021-06-19 14:45:21 -06:00
Alan Somers
b97c7abc1a fusefs: delete dead code
It was always dead, accidentally included in SVN r345876.

MFC after:	2 weeks
Reviewed by:	pfg
2021-06-19 14:45:04 -06:00
Lutz Donnerhacke
d261e57dea libalias: Switch to efficient data structure for incoming traffic
Current data structure is using a hash of unordered lists.  Those
unordered lists are quite efficient, because the least recently
inserted entries are most likely to be used again.  In order to avoid
long search times in other cases, the lists are hashed into many
buckets.  Unfortunatly a search for a miss needs an exhaustive
inspection and a careful definition of the hash.

Splay trees offer a similar feature: Almost O(1) for access of the
least recently used entries, and amortized O(ln(n)) for almost all
other cases.  Get rid of the hash.

Now the data structure should able to quickly react to external
packets without eating CPU cycles for breakfast, preventing a DoS.

PR:		192888
Discussed with:	Dimitry Luhtionov
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30536
2021-06-19 22:12:28 +02:00
Lutz Donnerhacke
935fc93af1 libalias: Switch to efficient data structure for outgoing traffic
Current data structure is using a hash of unordered lists.  Those
unordered lists are quite efficient, because the least recently
inserted entries are most likely to be used again.  In order to avoid
long search times in other cases, the lists are hashed into many
buckets.  Unfortunatly a search for a miss needs an exhaustive
inspection and a careful definition of the hash.

Splay trees offer a similar feature - almost O(1) for access of the
least recently used entries), and amortized O(ln(n) - for almost all
other cases.  Get rid of the hash.

Discussed with:	Dimitry Luhtionov
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30516
2021-06-19 22:09:44 +02:00
Lutz Donnerhacke
d989935b5b libalias: Restructure - Finalize
Note, that the restructuring is done.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30582
2021-06-19 21:58:56 +02:00
Lutz Donnerhacke
fe83900f9f libalias: Restructure - Remove temporary state deleteAllLinks from global struct
The entry deleteAllLinks in the struct libalias is only used to signal
a state between internal calls.  It's not used between API calls.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30604
2021-06-19 21:55:11 +02:00
Lutz Donnerhacke
9efcad61d8 libalias: Restructure - Use AliasRange instead of PORT_BASE
Get rid of PORT_BASE, replace by AliasRange. Simplify code.
Factor out the search for a new port. Improves the perfomance a bit.

Discussed with:	Dimitry Luhtionov
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30581
2021-06-19 21:40:09 +02:00
Lutz Donnerhacke
1178dda53d libalias: Restructure - Table for PPTP
Let PPTP use its own data structure.
Regroup and rename other lists, which are not PPTP.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30580
2021-06-19 21:26:31 +02:00
Lutz Donnerhacke
7b44ff4c52 libalias: Restructure - Group expire handling entries
Reorder the internal structure semantically.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30575
2021-06-19 21:12:27 +02:00
Lutz Donnerhacke
492d3b7109 libalias: Restructure - Group incoming links
Reorder incoming links by grouping of common search terms.
Significant performance improvement for incoming (missing) flows.

Remove LSNAT from outgoing search.
Slight speedup due to less comparsions in the loop.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30574
2021-06-19 21:03:47 +02:00
Lutz Donnerhacke
d4ab07d2ae libalias: Restructure - Cleanup and Use for links
Factor out a common idiom to return found links.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30573
2021-06-19 20:28:53 +02:00
Lutz Donnerhacke
d541903438 libalias: Restructure - Outgoing search
Factor out the outgoing search function.
Preparation for a new data structure.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30572
2021-06-19 20:25:08 +02:00
Lutz Donnerhacke
19dcc4f225 libalias: Restructure - Cleanup _FindLinkIn
Simplify program flow in function _FindLinkIn.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30571
2021-06-19 20:19:16 +02:00
Dimitry Andric
23408297fb Merge llvm-project 12.0.1 rc2
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR:		255570
MFC after:	6 weeks
2021-06-19 20:09:28 +02:00
Lutz Donnerhacke
cac129e603 libalias: Restructure - Table for partially links
Separate the partially specified links into a separate data structure.

This would causes a major parformance impact, if there are many of
them.  Use a (smaller) hash table to speed up the partially link
access.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30570
2021-06-19 20:03:08 +02:00
Richard Scheffenegger
74d7fc8753 tcp: Add PRR cwnd reduction for non-SACK loss
This completes PRR cwnd reduction in all circumstances
for the base TCP stack (SACK loss recovery, ECN window reduction,
non-SACK loss recovery), preventing the arriving ACKs to
clock out new data at the old, too high rate. This
reduces the chance to induce additional losses while
recovering from loss (during congested network conditions).

For non-SACK loss recovery, each ACK is assumed to have
one MSS delivered. In order to prevent ACK-split attacks,
only one window worth of ACKs is considered to actually
have delivered new data.

MFC after: 6 weeks
Reviewed By: rrs, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29441
2021-06-19 19:25:22 +02:00
Lutz Donnerhacke
32f9c2ceb3 libalias: Restructure - Separate fully qualified search
Search fully specified links first.  Some performance loss due to need
to revisit the db twice, if not found.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30569
2021-06-19 19:21:05 +02:00
Emmanuel Vadot
3386347f65 mmc_sim: Make XPT_MMC_GET_TRAN_SETTINGS fully async
Sponsored by:	Diablotin Systems
2021-06-19 19:15:25 +02:00
Emmanuel Vadot
6506efea63 mmccam: Read the common members of CSD v1.0 and v2.0
And only get the differents ones based on the version.

No functional changes intented.

Sponsored by:	Diablotin Systems
2021-06-19 19:06:54 +02:00
Emmanuel Vadot
20d601682e mmccam: Style(9) more mmc_da.c
No functional changes.
Sponsored by:	Diablotin Systems
2021-06-19 19:06:54 +02:00
Lutz Donnerhacke
d41044ddfd libalias: Restructure - Common search terms
Factor out the common Out and In filter
Slightly better performance due to eager skip of search loop

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30568
2021-06-19 18:58:52 +02:00
Lutz Donnerhacke
ef828d39be libalias: Promote per instance global variable timeStamp
Summary:
- Use LibAliasTime as a real global variable for central timekeeping.
- Reduce number of syscalls in user space considerably.
- Dynamically adjust the packet counters to match the second resolution.
- Only check the first few packets after a time increase for expiry.

Discussed with:	hselasky
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30566
2021-06-19 18:25:44 +02:00
Lutz Donnerhacke
3fd20a79e7 libalias: Stats are unsigned
Stats counters are used as unsigned valued (i.e. printf("%u")) but are
defined as signed int.  This causes trouble later, so fix it early.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30587
2021-06-19 18:21:17 +02:00
Emmanuel Vadot
ed0a582d88 pkgbase: Put the last sendmail files in the sendmail package
Differential Revision:	https://reviews.freebsd.org/D30757
Sponsored by:	Diablotin Systems
2021-06-19 17:50:11 +02:00
Emmanuel Vadot
af5e40770e pkgbase: Put the mibs and defs in the bnsmp package
Differential Revision:	https://reviews.freebsd.org/D30756
Sponsored by:	Diablotin Systems
2021-06-19 17:50:03 +02:00
Emmanuel Vadot
c42e9af5f1 pkgbase: Move ctld/ctladm to iscsi package
While here only compile both of them if WITH_ISCSI is set (this is the default).

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30755
Sponsored by:	Diablotin Systems
2021-06-19 17:49:57 +02:00
Emmanuel Vadot
081fb64492 pkgbase: Create a FreeBSD-nfs package
And move all the nfs related commands there.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30754
Sponsored by:	Diablotin Systems
2021-06-19 17:49:50 +02:00
Emmanuel Vadot
2c733106ae pkgbase: Put chio in utilities
No need to bloat runtime with this utility.

Differential Revision:	https://reviews.freebsd.org/D30753
Sponsored by:	Diablotin Systems
2021-06-19 17:49:44 +02:00
Emmanuel Vadot
79ac3c12a7 pkgbase: Put dtrace in its own package
While dtrace is usefull some people might not want it.

Differential Revision:	https://reviews.freebsd.org/D30752
Sponsored by:	Diablotin Systems
2021-06-19 17:49:31 +02:00
Emmanuel Vadot
395d907e61 regulator: Add manpage for this framework
Reviewed by:	imp, mmel
Differential Revision:	https://reviews.freebsd.org/D30762
Sponsored by:	Diablotin Systems
2021-06-19 17:42:43 +02:00
Warner Losh
0febdc5ed5 NOTES: Improve wording
jhb@ pointed out an extra plural in this phrase and a gramatical error,
so reword a little to be less awkward to fix both issues.

Sponsored by:		Netflix
2021-06-19 08:56:58 -06:00
Stefan Eßer
84f35b6f86 sbin/md5: add md5sum to synopsis in the man-page
When invoked with "sum" following the hash name, the -c option takes a
file argument, not a string argument.
2021-06-19 13:27:16 +02:00
Ka Ho Ng
210e6aec4f vmm: Fix ivrs_drv device_printf usage
The original %b description string is wrong.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	imp, jhb
Differential Revision:	https://reviews.freebsd.org/D30805
2021-06-19 14:07:26 +08:00
Peter Holm
3f770843d5 stress2: Add snap8.sh back on the exclude list 2021-06-19 07:03:25 +02:00