dim [Sat, 29 Feb 2020 15:08:14 +0000 (15:08 +0000)]
Merge ^/head r358400 through r358465.
dim [Sat, 29 Feb 2020 14:11:27 +0000 (14:11 +0000)]
Fix the following -Werror warning from clang 10.0.0:
sys/arm64/arm64/identcpu.c:1170:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
break;
^
sys/arm64/arm64/identcpu.c:1168:4: note: previous statement is here
if (fv[j].desc[0] != '\0')
^
The break should be after the if statement, indented one level less.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23871
emaste [Sat, 29 Feb 2020 13:25:38 +0000 (13:25 +0000)]
remove contrib/gperf
gperf was used only as a build tool for GCC, and is not needed after
r358454.
Sponsored by: The FreeBSD Foundation
lwhsu [Sat, 29 Feb 2020 13:24:41 +0000 (13:24 +0000)]
Fix test cases after r358448
sbin.pfctl.pfctl_test.pf0087
sbin.pfctl.pfctl_test.selfpf0087
MFC with: r358448
Sponsored by: The FreeBSD Foundation
emaste [Sat, 29 Feb 2020 13:15:01 +0000 (13:15 +0000)]
src.opts.mk: simplify Clang and lld bootstrap defaults
With the retirement of GCC 4.2.1 we can assume the host compiler supports
C++11, and can simplify the Clang and LLD defaults. Clang and lld are now
enabled by default everywhere, and are used as the bootstrap compiler and
linker for all targets except MIPS.
Sponsored by: The FreeBSD Foundation
emaste [Sat, 29 Feb 2020 12:46:02 +0000 (12:46 +0000)]
regen src.conf.5 after r358460, LLVM_LIBUNWIND option retirement
emaste [Sat, 29 Feb 2020 12:43:43 +0000 (12:43 +0000)]
retire the LLVM_LIBUNWIND option
LLVM's libunwind is used on all FreeBSD-supported CPU architectures and
is a required component.
Reviewed by: brooks (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23123
emaste [Sat, 29 Feb 2020 12:40:27 +0000 (12:40 +0000)]
Remove contrib/gcc and contrib/gcclibs
GCC 4.2.1 was disconnected from FreeBSD in r358454.
Sponsored by: The FreeBSD Foundation
emaste [Sat, 29 Feb 2020 03:43:18 +0000 (03:43 +0000)]
regen src.conf.5 after r358454, GCC 4.2.1 retirement
emaste [Sat, 29 Feb 2020 03:25:51 +0000 (03:25 +0000)]
remove GCC 4.2.1 build infrastructure
As described in Warner's email message[1] to the FreeBSD-arch mailing
list we have reached GCC 4.2.1's retirement date. At this time all
supported architectures either use in-tree Clang, or rely on external
toolchain (i.e., a contemporary GCC version from ports).
GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later
that year, in r171825. GCC has served us well, but version 4.2.1 is
obsolete and not used by default on any architecture in FreeBSD. It
does not support modern C and does not support arm64 or RISC-V.
Thanks to everyone responsible for maintaining, updating, and testing
GCC in the FreeBSD base system over the years.
So long, and thanks for all the fish.
[1] https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html
PR: 228919
Reviewed by: brooks, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23124
jeff [Fri, 28 Feb 2020 21:42:48 +0000 (21:42 +0000)]
Provide a lock free alternative to resolve bogus pages. This is not likely
to be much of a perf win, just a nice code simplification.
Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D23866
manu [Fri, 28 Feb 2020 21:31:40 +0000 (21:31 +0000)]
mmc: dwmmc: Fix off by one error
The IVAR_MAX_DATA is supposed to have the number of descriptor X the mmc
block size and desc_count contain all this information + 1.
Reported by: phk
MFC after: 1 week
brooks [Fri, 28 Feb 2020 21:13:15 +0000 (21:13 +0000)]
Define SCTL_MASK32 when COMPAT_FREEBSD32 is defined.
Remove the list of architectures and depend on COMPAT_FREEBSD32 which is
defined (if relevent) in opt_global.h and thus defined everywhere in
the kernel.
This is a minor change in behavior in that 32-bit compat for sysctls now
depends on COMPAT_FREEBSD32 rather than on the potential for 32-bit
compat support. The prior arrangement may have been part of an attempt
to allow 32-bit compat to be loadable, but such attempts are doomed to
failure (due to the fact that ioctls have no meaning without the
associated file descriptor) without vastly more refactoring and some
sort of COMPAT_FREEBSD32_SUPPORT option.
Reviewed by: jhb
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23748
pfg [Fri, 28 Feb 2020 20:43:35 +0000 (20:43 +0000)]
/etc/services: attempt to bring the database to this century 1/2.
This is the result of splitting r358153 in two, in order to avoid a build
system bug and being able to merge the change to previous releases..
Document better this file, updating the URL to the IANA registry and closely
match the official services.
For system ports (0 to 1023) we now try to follow the registry closely, noting
some historical differences where applicable.
As a side effect: drop references to unofficial Kerberos IV which was EOL'ed
on Oct 2006[1]. While it is conceivable some people may still use it in some
very old FreeBSD machines that can't be replaced easily, the use of it is
considered a security risk. Also drop the unofficial netatalk, which we
supported long ago in the kernel but was dropped long ago.
Leave for now smtps, even though it conflicts with IANA's submissions.
The change should have very little visibility, if any, but should be a
step closer to the current IANA database.
[1] https://web.mit.edu/kerberos/krb4-end-of-life.html
MFC after: 2 weeks
jeff [Fri, 28 Feb 2020 20:34:30 +0000 (20:34 +0000)]
Convert a few triviail consumers to the new unlocked grab API.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D23847
jeff [Fri, 28 Feb 2020 20:33:28 +0000 (20:33 +0000)]
Use unlocked grab for uipc_shm/tmpfs.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23865
jeff [Fri, 28 Feb 2020 20:32:35 +0000 (20:32 +0000)]
Support the NOCREAT flag for grab_valid_unlocked.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23865
jeff [Fri, 28 Feb 2020 20:30:53 +0000 (20:30 +0000)]
Simplify vref() code in object_reference. The local temporary is no longer
necessary. Fix formatting errors.
Reported by: mjg
Discussed with: kib
jeff [Fri, 28 Feb 2020 20:29:53 +0000 (20:29 +0000)]
Eliminate object locking in zfs where possible with the new lockless grab
APIs.
Reviewed by: kib, markj, mmacy
Differential Revision: https://reviews.freebsd.org/D23848
rlibby [Fri, 28 Feb 2020 18:32:40 +0000 (18:32 +0000)]
amd64 pmap.c: minor codegen optimization in flag access
Following previous revision, apply the same minor optimization to
hand-rolled atomic_fcmpset_128 in pmap.c.
Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23870
rlibby [Fri, 28 Feb 2020 18:32:36 +0000 (18:32 +0000)]
amd64 atomic.h: minor codegen optimization in flag access
Previously the pattern to extract status flags from inline assembly
blocks was to use setcc in the block to write the flag to a register.
This was suboptimal in a few ways:
- It would lead to code like: sete %cl; test %cl; jne, i.e. a flag
would just be loaded into a register and then reloaded to a flag.
- The setcc would force the block to use an additional register.
- If the client code didn't care for the flag value then the setcc
would be entirely pointless but could not be eliminated by the
optimizer.
A more modern inline asm construct (since gcc 6 and clang 9) allows for
"flag output operands", where a C variable can be written directly from
a flag. The optimizer can then use this to produce direct code where
the flag does not take a trip through a register.
In practice this makes each affected operation sequence shorter by five
bytes of instructions. It's unlikely this has a measurable performance
impact.
Reviewed by: kib, markj, mjg
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23869
markj [Fri, 28 Feb 2020 17:38:31 +0000 (17:38 +0000)]
Fix r358436 to not declare kernel symbols when _KERNEL is not defined.
Reported by: Jenkins, Michael Butler
Pointy hat: markj
markj [Fri, 28 Feb 2020 17:23:53 +0000 (17:23 +0000)]
sy_call_t and systrace_args_func_t need to be visible to userspace.
Reported by: Jenkins
markj [Fri, 28 Feb 2020 17:05:27 +0000 (17:05 +0000)]
Do not load dtraceall.ko if dtrace.ko is already loaded.
This was the intent of the existing code, but instead it would
unconditionally load dtraceall.ko because of a stale errno value.
Reported by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
markj [Fri, 28 Feb 2020 17:05:04 +0000 (17:05 +0000)]
Fix standalone builds of systrace.ko after r357912.
Sponsored by: The FreeBSD Foundation
markj [Fri, 28 Feb 2020 17:04:36 +0000 (17:04 +0000)]
Clear systrace_args_func when systrace probes are disabled.
This function pointer is invalidated when systrace.ko is unloaded.
Reported by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
markj [Fri, 28 Feb 2020 16:05:18 +0000 (16:05 +0000)]
Add a blocking counter KPI.
refcount(9) was recently extended to support waiting on a refcount to
drop to zero, as this was needed for a lockless VM object
paging-in-progress counter. However, this adds overhead to all uses of
refcount(9) and doesn't really match traditional refcounting semantics:
once a counter has dropped to zero, the protected object may be freed at
any point and it is not safe to dereference the counter.
This change removes that extension and instead adds a new set of KPIs,
blockcount_*, for use by VM object PIP and busy.
Reviewed by: jeff, kib, mjg
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23723
jhibbits [Fri, 28 Feb 2020 15:59:35 +0000 (15:59 +0000)]
Add Denverton UART PCI ID
MFC after: 3 days
Sponsored by: Juniper Networks, Inc
manu [Fri, 28 Feb 2020 15:42:51 +0000 (15:42 +0000)]
dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5
MFC after: 2 months
manu [Fri, 28 Feb 2020 15:14:48 +0000 (15:14 +0000)]
DTS: Update the device-tree files to Linux 5.5
bz [Fri, 28 Feb 2020 11:16:41 +0000 (11:16 +0000)]
mld6: initialize oifp to avoid bogus results/panics in edge cases
In certain cases (probably not during normal operation but observed in
the lab during development) ip6_ouput() could return without error
and ifpp (&oifp) not updated.
Given oifp was never initialized we would take the later branch
as oifp was not NULL, and when calling icmp6_ifstat_inc() we would
panic dereferencing a garbage pointer.
For code stability initialize oifp to NULL before first use to always
have a deterministic value and not rely on a called function to behave
and always and for ever do the work for us as we hope for.
MFC after: 3 days
Sponsored by: Netflix
manu [Fri, 28 Feb 2020 10:57:23 +0000 (10:57 +0000)]
arm: zynq: An SPI driver for Zynq platforms
Submitted by: Thomas Skibo
Differential Revision: https://reviews.freebsd.org/D23319
philip [Fri, 28 Feb 2020 03:39:00 +0000 (03:39 +0000)]
bsdinstall: remove the Italian mirror
ftp.it.FreeBSD.org has been down for several years.
PR: 244481
Reported by: xgeoplasma6@gmail.com
MFC after: 3 days
philip [Fri, 28 Feb 2020 03:38:57 +0000 (03:38 +0000)]
bsdconfig: remove the Italian mirror
ftp.it.FreeBSD.org has been down for several years.
PR: 244481
Reported by: xgeoplasma6@gmail.com
MFC after: 3 days
imp [Fri, 28 Feb 2020 01:18:11 +0000 (01:18 +0000)]
This is a FALLTHROUGH for sure. no need for xxx comment.
imp [Fri, 28 Feb 2020 01:02:01 +0000 (01:02 +0000)]
Remove duplicated ATA_CHECK_POWER_MODE
jhb [Fri, 28 Feb 2020 00:42:27 +0000 (00:42 +0000)]
Rename TOE TLS stats from [rt]x_tls_* to [rt]x_toe_tls_*.
This more clearly differentiates TLS records encrypted and decrypted
in TOE connections from those encrypted via NIC TLS.
MFC after: 1 week
Sponsored by: Chelsio Communications
brooks [Thu, 27 Feb 2020 23:06:40 +0000 (23:06 +0000)]
Remove trailing whitespace.
jkim [Thu, 27 Feb 2020 23:06:12 +0000 (23:06 +0000)]
Plug possible memory leaks in the previous patch.
Two DH_free() calls were accidentally removed.
Pointyhat to: jkim
jkim [Thu, 27 Feb 2020 22:36:16 +0000 (22:36 +0000)]
Do not free p and g parameters after calling DH_set0_pqg(3).
It is specifically mentioned in the manual page. Note it has no functional
change in reality because DH_set0_pqg() cannot fail when both p and g are
not NULL.
jkim [Thu, 27 Feb 2020 22:02:00 +0000 (22:02 +0000)]
Fix style inconsistencies near our OpenSSL 1.1.x patch.
jkim [Thu, 27 Feb 2020 20:46:30 +0000 (20:46 +0000)]
Fix a white space.
brooks [Thu, 27 Feb 2020 20:26:37 +0000 (20:26 +0000)]
riscv: Add a GENERIC-NODEBUG (copied from amd64)
Sponsored by: DARPA
brooks [Thu, 27 Feb 2020 20:08:46 +0000 (20:08 +0000)]
Merge commit
7214f7a79 from llvm git (by Sam Elliott):
[RISCV] Lower llvm.trap and llvm.debugtrap
Summary:
Until this commit, these have lowered to a call to abort().
`llvm.trap()` now lowers to `unimp`, which should trap on all systems.
`llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this
instruction is for.
Reviewers: asb, luismarques
Reviewed By: asb
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69390
This fixes miscompilation resulting in linking failures with
INVARIANTS disabled.
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D23857
dim [Thu, 27 Feb 2020 19:59:17 +0000 (19:59 +0000)]
Merge r358406 from the clang1000-import branch:
Fix the following -Werror warning from clang 10.0.0:
sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
if (val & CPUV7_CT_CTYPE_RA)
^
sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here
if (val & CPUV7_CT_CTYPE_WB)
^
This was due to an accidentally inserted tab before the if statement.
MFC after: 3 days
dim [Thu, 27 Feb 2020 19:58:20 +0000 (19:58 +0000)]
Fix the following -Werror warning from clang 10.0.0:
sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
if (val & CPUV7_CT_CTYPE_RA)
^
sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here
if (val & CPUV7_CT_CTYPE_WB)
^
This was due to an accidentally inserted tab before the if statement.
MFC after: 3 days
hrs [Thu, 27 Feb 2020 19:49:59 +0000 (19:49 +0000)]
Fix poor performance of ftp(1) due to small SO_SNDBUF and SO_RCVBUF.
ftp(1) from vendor/tnftp always tried the following for
every TCP connection:
1. Get the current buffer length of SO_SNDBUF and SO_RCVBUF
by getsockopt(2).
2. Invoke setsockopt(2) to set them to the same values
after checking if they are in a range between 8 KiB to 8 MiB.
This behavior broke dynamic buffer sizing enabled by
default (net.inet.tcp.{recv,send}buf_auto sysctls) and
led to a very poor transfer rate. The fetch(1) utility
does not have this problem.
This change prevents SO_SNDBUF and SO_RCVBUF from configuring
when the buffer auto-sizing is enabled unless the buffer sizes are
explicitly specified.
PR: 240827
Spotted by: Yuichiro NAITO
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23732
hrs [Thu, 27 Feb 2020 19:40:29 +0000 (19:40 +0000)]
Fix broken STARTTLS when SharedMemoryKey is enabled.
OpenSSL 1.1 API patch for sendmail had a bug which
prevented sm_RSA_generate_key() function from working.
This function is used to generate a temporary RSA key
for a shared memory region used for TLS processing.
Note that 12.0 and 12.1-RELEASE include this bug.
This affects only if SM_CONF_SHM compile-time
option (enabled by default) and SharedMemoryKey
run-time option (not enabled by default) in a .cf file are
specified. The latter corresponds to confSHARED_MEMORY_KEY in
a .mc file.
PR: 242861
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23734
trasz [Thu, 27 Feb 2020 19:40:20 +0000 (19:40 +0000)]
Make linuxulator warn about unsupported getsockopt/setsockopt flags.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D23791
hrs [Thu, 27 Feb 2020 19:35:17 +0000 (19:35 +0000)]
Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module.
Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23807
dim [Thu, 27 Feb 2020 19:07:10 +0000 (19:07 +0000)]
Merge ^/head r358269 through r358399.
jeff [Thu, 27 Feb 2020 19:05:26 +0000 (19:05 +0000)]
Simplify lazy advance with a 64bit atomic cmpset.
This provides the potential to force a lazy (tick based) SMR to advance
when there are blocking waiters by decoupling the wr_seq value from the
ticks value.
Add some missing compiler barriers.
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D23825
dim [Thu, 27 Feb 2020 19:04:39 +0000 (19:04 +0000)]
Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc2-70-ge5cb70267e7), and bump versions.
dim [Thu, 27 Feb 2020 18:49:49 +0000 (18:49 +0000)]
Merge commit
2e24219d3 from llvm git (by Hans Wennborg):
[MC][ARM] Resolve some pcrel fixups at assembly time (PR44929)
MC currently does not emit these relocation types, and lld does not
handle them. Add FKF_Constant as a work-around of some ARM code after
D72197. Eventually we probably should implement these relocation
types.
By Fangrui Song!
Differential revision: https://reviews.llvm.org/D72892
This re-enables using the arm 'adr' pseudo instruction on global symbols
again. It was broken as a side-effect of upstream commit
2bfee35cb,
which lead to "error: unsupported relocation on symbol" when assembling
such constructs, which are used in e.g. sys/arm/arm/locore-v[46].S.
PR: 244251
hrs [Thu, 27 Feb 2020 17:13:57 +0000 (17:13 +0000)]
Add workaround for models which do not follow the ACPI specification strictly.
Extra objects are now simply ignored instead of rejecting everything.
jhb [Thu, 27 Feb 2020 16:51:41 +0000 (16:51 +0000)]
Use stream_read() to read all 12 bytes of the RFB client version.
read() can return a short read, whereas stream_read() waits until the
full version string is read.
Submitted by: Ka Ho Ng <khng300_gmail.com>
Reviewed by: grehan
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23591
imp [Thu, 27 Feb 2020 15:34:30 +0000 (15:34 +0000)]
Better check for floating point type.
Use __riscv_flen instead of __riscv_float_abi_soft. While the latter works for
userland (and one could argue it's more correct), it fails for the kernel. We
compile the kernel with -mabi=lp64 (eg soft float abi) to avoid floating point
instructions in the kernel. We also compile the kernel -march=rv64imafdc for
hard float kernels (eg those with options FPE), but with -march=rv64imac for
softfloat kernels (eg those with FPE). Since we do this, in the kernel (as in
userland) __riscv_flen will be defined for 'riscv64' and not for 'riscv64sf'.
This also removes the -DMACHINE_ARCH hack now that it's no longer needed.
Longer term, we should return the ABI from the sysctl hw.machine_arch like on
amd64 for i386 binaries.
Suggested by: mhorne@
Differential Revision: https://reviews.freebsd.org/D23813
imp [Thu, 27 Feb 2020 15:30:13 +0000 (15:30 +0000)]
_Static_assert is to be preferred to CTASSERT.
Document the existing prefernce that _Static_assert be used in preference to the
old CTASSERT we used to use for compile time assertions.
imp [Thu, 27 Feb 2020 15:25:31 +0000 (15:25 +0000)]
Remove FreeBSD 4 support
imp [Thu, 27 Feb 2020 15:25:26 +0000 (15:25 +0000)]
Remove FreeBSD 7-9 support from oce
Use newer pci_find_cap API now that the need to remap the old API is gone.
imp [Thu, 27 Feb 2020 15:25:21 +0000 (15:25 +0000)]
Remove support for FreeBSD 7 and 8
Also, unifdef -DSFXGE_HAVE_DESCRIBE_INTR since it's now always defined.
hselasky [Thu, 27 Feb 2020 15:21:05 +0000 (15:21 +0000)]
Extend the range of the return value from nsecs_to_jiffies64() to support
Mesa's drm_syncobj usage, in the LinuxKPI.
While at it optimise the jiffies conversion functions to avoid repeated
and constant calculations.
Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D23846
MFC after: 1 week
Sponsored by: Mellanox Technologies
avg [Thu, 27 Feb 2020 14:27:42 +0000 (14:27 +0000)]
remove stray space symbol in r358380
MFC after: 1 week
X-MFC with: r358380
avg [Thu, 27 Feb 2020 14:21:01 +0000 (14:21 +0000)]
use ZFS_MAX_DATASET_NAME_LEN instead of MAXPATHLEN for dataset names
The change affects only FreeBSD specific code as the common code already
mostly uses the more idiomatic and correct ZFS_MAX_DATASET_NAME_LEN.
MFC after: 1 week
avg [Thu, 27 Feb 2020 14:12:43 +0000 (14:12 +0000)]
dsl_dataset_promote_sync: populate 'oldname' before using it
It's very unlikely that zfsvfs_update_fromname() and
zvol_rename_minors() ever did anything during the promote operation as
the old name was not initialized.
MFC after: 1 week
kaktus [Thu, 27 Feb 2020 13:12:14 +0000 (13:12 +0000)]
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Reviewed by: cem
Approved by: csprng, kib (mentor, blanket)
Differential Revision: https://reviews.freebsd.org/D23841
bapt [Thu, 27 Feb 2020 11:23:44 +0000 (11:23 +0000)]
Update pci_vendors to 2020.02.22
MFC after: 2 days
jeff [Thu, 27 Feb 2020 08:23:10 +0000 (08:23 +0000)]
A pair of performance improvements.
Swap buckets on free as well as alloc so that alloc is always the most
cache-hot data.
When selecting a zone domain for the round-robin bucket cache use the
local domain unless there is a severe imbalance. This does not affinitize
memory, only locks and queues.
Reviewed by: markj, rlibby
Differential Revision: https://reviews.freebsd.org/D23824
scottl [Thu, 27 Feb 2020 05:00:21 +0000 (05:00 +0000)]
Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this
avoids silent data corruption.
PR: 225666
Submitted by: anders lundgren
MFC after: 3 days
imp [Thu, 27 Feb 2020 04:47:12 +0000 (04:47 +0000)]
Remove now empty sparc64 directories (oh, and stand/sparc64 files)
imp [Thu, 27 Feb 2020 04:44:58 +0000 (04:44 +0000)]
Remove libthr, csu, libthread_db and testfloat sparc64 specific directories.
Submitted by: kib@ (libthr)
jeff [Thu, 27 Feb 2020 02:37:27 +0000 (02:37 +0000)]
Add unlocked grab* function variants that use lockless radix code to
lookup pages. These variants will fall back to their locked counterparts
if the page is not present.
Discussed with: kib, markj
Differential Revision: https://reviews.freebsd.org/D23449
imp [Wed, 26 Feb 2020 23:17:16 +0000 (23:17 +0000)]
Remove sparc64 source files from rtld-elf
These were missed in the prior sweep.
Submitted by: jhb@
mav [Wed, 26 Feb 2020 20:38:48 +0000 (20:38 +0000)]
MFZoL: Relax restriction on zfs_ioc_next_obj() iteration
Per the documentation for dnode_next_offset in dnode.c, the "txg"
parameter specifies a lower bound on which transaction the dnode can
be found in. We are interested in all dnodes that are removed between
the first and last transaction in the snapshot. It doesn't need to be
created in that snapshot to correspond to a removed file.
In fact, the behavior of zfs diff in the test case exactly matches
this: the transaction that created the data that was deleted in snapshot
"2" was produced before, in snapshot "1", definitely predating the first
transaction in snapshot "2".
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <Tim Chase <tim@onlight.com>
Closes #2081
zfsonlinux/zfs@
7290cd3c4ed19fb3f75b8133db2e36afcdd24beb
MFC after: 1 week
cy [Wed, 26 Feb 2020 20:18:38 +0000 (20:18 +0000)]
With the planned removal of GIANT (sysctl uses GIANT), make future-proof
ipfilter by making it sysctl locking mpsafe.
Reviewed by: kaktus
Differential Revision: https://reviews.freebsd.org/D23839
emaste [Wed, 26 Feb 2020 20:03:43 +0000 (20:03 +0000)]
Return ENOTSUP for mmap/mprotect if prot not subset of prot_max
From POSIX,
[ENOTSUP]
The implementation does not support the combination of accesses
requested in the prot argument.
This fits the case that prot contains permissions which are not a subset
of prot_max.
Reviewed by: brooks, cem
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23843
imp [Wed, 26 Feb 2020 19:39:59 +0000 (19:39 +0000)]
Remove support for FreeBSD 4-7.
It's doubtful this driver would still work unchanged there.
Compile tested only because I no longer have ahc/ahd devices.
imp [Wed, 26 Feb 2020 19:39:52 +0000 (19:39 +0000)]
Remove support for FreeBSD 4.x and earlier from agp driver
Compile tested only, but do we still need this driver?
carlavilla [Wed, 26 Feb 2020 19:16:23 +0000 (19:16 +0000)]
Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)
Submitted by: gbergling_gmail.com
Approved by: bcr@(mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23832
imp [Wed, 26 Feb 2020 19:15:08 +0000 (19:15 +0000)]
Remove support for all pre FreeBSD 11.0 versions from mpr and mps.
Remove a number of workarounds for older versions of FreeBSD. FreeBSD stable/10
was branched over 6 years ago. All of these changes date from about that time or
earlier. These workarounds are extensive and get in the way of understanding
the current flow in the driver.
emaste [Wed, 26 Feb 2020 19:12:36 +0000 (19:12 +0000)]
src.conf.5: regen after sparc64 removal
emaste [Wed, 26 Feb 2020 19:08:23 +0000 (19:08 +0000)]
src.opts.mk: drop MIPS special case for disabling BINUTILS_BOOTSTRAP
Binutils has already been reduced to installing ld only on powerpc32
and as only on amd64. (Also objdump on every arch supported by binutils
2.17.50.) Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there
is no reason to have a special case for it.
Sponsored by: The FreeBSD Foundation
imp [Wed, 26 Feb 2020 18:55:09 +0000 (18:55 +0000)]
Remove sparc64 specific parts of libc.
Also update comments for which architectures use 128 bit long doubles,
as appropriate.
The softfloat specialization routines weren't updated since they
appear to be from an upstream source which we may want to update in
the future to get a more favorable license.
Reviewed by: emaste@
Differential Revision: https://reviews.freebsd.org/D23658
imp [Wed, 26 Feb 2020 18:55:03 +0000 (18:55 +0000)]
Remove sparc64 specific parts of libm and fix comments
Once upon a time, sparc64 was the only ld128 architecture. However,
both aarch64 and riscv are now such architectures. Many of the
comments about how slow multiplication was on old sparc64 processors
are now no longer true. However, since no evaluation has been done for
aarch64 yet, it's unclear if they are still relevant or not. If not,
the code should be changed. If so, the comments should remove the
uncertainty.
Reviewed by: emaste@
Differential Revision: https://reviews.freebsd.org/D23658
imp [Wed, 26 Feb 2020 18:49:25 +0000 (18:49 +0000)]
Remove sparc64 specific parts of rtld-elf.
imp [Wed, 26 Feb 2020 18:49:20 +0000 (18:49 +0000)]
Remove sparc64 specific buid-system hacks
Remove all the sparc64 hacks and tweaks to the build system. We don't
need them anymore.
emaste [Wed, 26 Feb 2020 18:46:41 +0000 (18:46 +0000)]
mprotect.2: sort errors alphabetically
Reported by: brooks
MFC after: 3 days
tsoome [Wed, 26 Feb 2020 18:12:12 +0000 (18:12 +0000)]
loader: replace zfs_alloc/zfs_free with malloc/free
Use common memory management.
mav [Wed, 26 Feb 2020 16:51:45 +0000 (16:51 +0000)]
MFZoL: Fix resilver writes in vdev_indirect_io_start
This patch addresses an issue found in ztest where resilver
write zios that were passed to an indirect vdev would end up
being handled as though they were resilver read zios. This
caused issues where the zio->io_abd would be both read to
and written from at the same time, causing asserts to fail.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8193
zfsonlinux/zfs@
5aa95ba0d3502779695341b5f55fa5ba1d3330ff
MFC after: 1 week
imp [Wed, 26 Feb 2020 16:22:28 +0000 (16:22 +0000)]
Remove trailing white space.
mav [Wed, 26 Feb 2020 16:04:24 +0000 (16:04 +0000)]
Fix patch mismerge in r358336.
MFC after: 1 week
mav [Wed, 26 Feb 2020 15:59:46 +0000 (15:59 +0000)]
MFZoL: Fix issue with scanning dedup blocks as scan ends
This patch fixes an issue discovered by ztest where
dsl_scan_ddt_entry() could add I/Os to the dsl scan queues
between when the scan had finished all required work and
when the scan was marked as complete. This caused the scan
to spin indefinitely without ending.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8010
zfsonlinux/zfs@
5e0bd0ae056e26de36dee3c199c6fcff8f14ee15
MFC after: 1 week
andrew [Wed, 26 Feb 2020 15:56:07 +0000 (15:56 +0000)]
Fix the cache type identification
DIC and IDC are supported when the field bits are set.
Sponsored by: Innovate UK
mav [Wed, 26 Feb 2020 15:47:40 +0000 (15:47 +0000)]
MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t
This patch corrects 2 small bugs where scn->scn_phys_cached was
not properly updated to match the primary copy when it needed to
be. The first resulted in the pause state not being properly
updated and the second resulted in the cached version being
completely zeroed even if the primary was not.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8010
zfsonlinux/zfs@
8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6
MFC after: 1 week
mav [Wed, 26 Feb 2020 15:45:04 +0000 (15:45 +0000)]
MFZoL: Fix txg_sync_thread hang in scan_exec_io()
When scn->scn_maxinflight_bytes has not been initialized it's
possible to hang on the condition variable in scan_exec_io().
This issue was uncovered by ztest and is only possible when
deduplication is enabled through the following call path.
txg_sync_thread()
spa_sync()
ddt_sync_table()
ddt_sync_entry()
dsl_scan_ddt_entry()
dsl_scan_scrub_cb()
dsl_scan_enqueuei()
scan_exec_io()
cv_wait()
Resolve the issue by always initializing scn_maxinflight_bytes
to a reasonable minimum value. This value will be recalculated
in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit
and the addition/removal of vdevs.
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7098
zfsonlinux/zfs@
f90a30ad1b32a971f62a540f8944e42f99b254ce
MFC after: 1 week
lwhsu [Wed, 26 Feb 2020 15:15:55 +0000 (15:15 +0000)]
Skip the right test case
PR: 244172
Sponsored by: The FreeBSD Foundation
kaktus [Wed, 26 Feb 2020 15:12:38 +0000 (15:12 +0000)]
Move the SYSCTL_ENFORCE_FLAGS to SYSCTL_NODE_WITH_LABEL where it should be
at the beginning.
kaktus [Wed, 26 Feb 2020 14:26:36 +0000 (14:26 +0000)]
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
rrs [Wed, 26 Feb 2020 13:48:33 +0000 (13:48 +0000)]
This commit expands tcp_ratelimit to be able to handle cards
like the mlx-c5 and c6 that require a "setup" routine before
the tcp_ratelimit code can declare and use a rate. I add the
setup routine to if_var as well as fix tcp_ratelimit to call it.
I also revisit the rates so that in the case of a mlx card
of type c5/6 we will use about 100 rates concentrated in the range
where the most gain can be had (1-200Mbps). Note that I have
tested these on a c5 and they work and perform well. In fact
in an unloaded system they pace right to the correct rate (great
job mlx!). There will be a further commit here from Hans that
will add the respective changes to the mlx driver to support this
work (which I was testing with).
Sponsored by: Netflix Inc.
Differential Revision: ttps://reviews.freebsd.org/D23647
andrew [Wed, 26 Feb 2020 13:22:23 +0000 (13:22 +0000)]
Teach the arm64 ident CPU code to print non-ID registers
Add support for non-ID registers when printing CPU information. This is
used with the cache type register to print details of the cache on boot.
Sponsored by: Innovate UK