bapt [Sat, 9 Jun 2018 20:24:17 +0000 (20:24 +0000)]
Isolate the pr(1) related code in its own source files
This keeps diffreg.c closer to what it is supposed to do:
diffing regular files.
It also allows my code to get a proper license
eadler [Sat, 9 Jun 2018 20:06:06 +0000 (20:06 +0000)]
top(1): allow starting with -T flag
markj [Sat, 9 Jun 2018 20:01:03 +0000 (20:01 +0000)]
Bump __FreeBSD_version after r334881 and force libdwarf to be rebuilt.
Reported by: O. Hartmann <ohartmann@walstatt.org>
Reviewed by: bdrewery
kevans [Sat, 9 Jun 2018 19:51:09 +0000 (19:51 +0000)]
lualoader: Add cli.lua(8) to the tree
Reviewed by: rpokala
Differential Revision: https://reviews.freebsd.org/D14818
markj [Sat, 9 Jun 2018 18:31:19 +0000 (18:31 +0000)]
Tell the compiler that rdtscp clobbers %ecx.
kevans [Sat, 9 Jun 2018 18:11:46 +0000 (18:11 +0000)]
bsdgrep(1): Some more int -> bool conversions and name changes
Again motivated by upcoming work to rewrite a bunch of this- single-letter
variable names and slightly misleading variable names ("lastmatches" to
indicate that the last matched) are not helpful.
allanjude [Sat, 9 Jun 2018 17:49:43 +0000 (17:49 +0000)]
Add ZFS+GPT EFI and LEGACY+EFI to rootgen.sh and installboot.sh
Reviewed by: imp (maintainer)
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D15700
allanjude [Sat, 9 Jun 2018 17:47:56 +0000 (17:47 +0000)]
Change rootgen.sh to use the default ZFS boot environment name
Reviewed by: imp (maintainer)
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D15699
dim [Sat, 9 Jun 2018 17:40:31 +0000 (17:40 +0000)]
Add missed libc++ entries to (Optional)ObsoleteFiles.inc
Some of these were removed during the libc++ 5.0.0 import, others were
added in the libc++ 6.0.0 import.
MFC after: 3 days
kevans [Sat, 9 Jun 2018 15:52:29 +0000 (15:52 +0000)]
stand: One more trivial consolidation (setting environment from howto)
kevans [Sat, 9 Jun 2018 15:28:37 +0000 (15:28 +0000)]
stand: Fix build after r334882
Not sure how this was not caught in Universe.
markj [Sat, 9 Jun 2018 15:10:49 +0000 (15:10 +0000)]
Don't process DWARF generated from non-C/C++ code.
ctfconvert(1) is not designed to handle DWARF generated from such code,
and will generally fail in non-obvious ways. Use an explicit check to
help catch such potential failures.
Reported by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 2 weeks
kevans [Sat, 9 Jun 2018 15:10:39 +0000 (15:10 +0000)]
stand: Consolidate checking for boot flags driven by environment vars
e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these
in multiple places, consolidate into common/ and allow a setting of "NO" for
any of these to turn them off. This allows systems with multiple
loader.conf(5) or loader.conf(5) overlay systems to easily turn off
variables in later processed files by setting it to NO.
Reported by: Nick Wolff @ iXsystems
Reviewed by: imp
markj [Sat, 9 Jun 2018 14:50:38 +0000 (14:50 +0000)]
Add DW_LANG_* definitions from DWARF 4 and 5.
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15712
andrew [Sat, 9 Jun 2018 14:47:49 +0000 (14:47 +0000)]
In the ThunderX BGX network driver we were skipping the NULL terminator
when parsing the phy type, however this is included in the length returned
by OF_getprop. To fix this stop ignoring the terminator.
PR: 228828
Reported by: sbruno
Sponsored by: DARPA, AFRL
kevans [Sat, 9 Jun 2018 14:26:30 +0000 (14:26 +0000)]
lualoader: Add hook.lua(8) to tree
Reviewed by: rpokala (w/ "All Rights Reserved" previously added)
Differential Revision: https://reviews.freebsd.org/D14815
kevans [Sat, 9 Jun 2018 14:24:16 +0000 (14:24 +0000)]
libsa(3): Correct statement about FS Write-support, name change
- jhb implemented UFS write support a little over 16 years ago.
- Update the library name while we're here.
Reviewed by: jhb, rpokala
Differential Revision: https://reviews.freebsd.org/D14476
kp [Sat, 9 Jun 2018 14:21:07 +0000 (14:21 +0000)]
pf tests: Basic route-to tests
Very basic route-to tests. These tests attempt to provoke PR 228782 for IPv4
and IPv6. A test failure will panic the machine.
kp [Sat, 9 Jun 2018 14:17:06 +0000 (14:17 +0000)]
pf: Fix deadlock with route-to
If a locally generated packet is routed (with route-to/reply-to/dup-to) out of
a different interface it's passed through the firewall again. This meant we
lost the inp pointer and if we required the pointer (e.g. for user ID matching)
we'd deadlock trying to acquire an inp lock we've already got.
Pass the inp pointer along with pf_route()/pf_route6().
PR: 228782
MFC after: 1 week
ae [Sat, 9 Jun 2018 09:57:14 +0000 (09:57 +0000)]
Explicitly change the link state when we assingn an address.
Since we are setting IFF_UP flag on SIOCSIFADDR, it is possible, that
after this link state information still not initialized properly.
This leads to problems with routing, since now interface has
IFCAP_LINKSTATE capability and a route is considered as working only
when interface's link state is in LINK_STATE_UP (see RT_LINK_IS_UP()
macro).
Reported by: Marek Zarychta
MFC after: 3 days
eadler [Sat, 9 Jun 2018 04:54:36 +0000 (04:54 +0000)]
pmc: mark some dead functions as such
Also change a single instance of the comma operator to a semi-colon.
Reviewed by: mmacy
eadler [Sat, 9 Jun 2018 04:40:17 +0000 (04:40 +0000)]
ncal: correct history section
originally reported Todd C. Miller[0]
Additional data see [1][2].
While here, pet igor.
Closes #152 (github pr)
Sbmitted by: Raf Czlonka
[0]
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/cal/cal.1?rev=1.28&content-type=text/x-cvsweb-markup
[1] https://www.bell-labs.com/usr/dmr/www/1stEdman.html
[2] https://www.bell-labs.com/usr/dmr/www/man61.pdf
eadler [Sat, 9 Jun 2018 03:08:04 +0000 (03:08 +0000)]
LOCKS: update current locks
- use a wild card for releng instead of listing them out. This ignores a
technicality that re@ owns the branches during release cycles, but this
has not been document in this file in a long time (if ever).
Approved by: core
eadler [Sat, 9 Jun 2018 02:47:02 +0000 (02:47 +0000)]
top(1): correct header, align it.
THR is always 6 digits or longer. Now that the PID/THR change is
separated, use correct headers.
PR: 228823
Reported by: Trond.Endrestol@ximalas.info
sjg [Sat, 9 Jun 2018 02:41:51 +0000 (02:41 +0000)]
Add st_mtime, st_ino and st_dev for ufs_stat
Differential Revision: D15064
mmacy [Sat, 9 Jun 2018 02:25:18 +0000 (02:25 +0000)]
pmc: fix logic in skipping riscv
eadler [Sat, 9 Jun 2018 02:18:15 +0000 (02:18 +0000)]
top(1): actually make change for tid vs pid
mmacy [Sat, 9 Jun 2018 02:15:45 +0000 (02:15 +0000)]
pmc: don't build on riscv where there's no kmod support
eadler [Sat, 9 Jun 2018 02:14:33 +0000 (02:14 +0000)]
top(1): use a different command to toggle tid vs pid
- By popular demand, implement a different switch ("T") for toggling
between thread id and process id.
- Add an assert that the size of command chars is as expected.
- Also clean up some messiness I found when implementing this.
- Further document the new flag.
Requested by: flo, ronald-lists@klop.ws, bapt
PR: 139389 (for the record)
X-MFC-With: r334474
mjg [Fri, 8 Jun 2018 22:06:32 +0000 (22:06 +0000)]
counter: add a bit missed in r334858
It happens to be a noop.
shurd [Fri, 8 Jun 2018 21:49:19 +0000 (21:49 +0000)]
Remove tx task spinning added in r333686
This caused issues with PASTE. Just remove the reschedule since the DELAY()
should be enough for use cases such as pkt-gen which were failing before the
change.
Reported by: Michio Honda
Sponsored by: Limelight Networks
mjg [Fri, 8 Jun 2018 21:40:03 +0000 (21:40 +0000)]
uma: implement provisional api for per-cpu zones
Per-cpu zone allocations are very rarely done compared to regular zones.
The intent is to avoid pessimizing the latter case with per-cpu specific
code.
In particular contrary to the claim in r334824, M_ZERO is sometimes being
used for such zones. But the zeroing method is completely different and
braching on it in the fast path for regular zones is a waste of time.
mmacy [Fri, 8 Jun 2018 20:39:49 +0000 (20:39 +0000)]
hwpmc: remove dangling references to hwpmc_xscale
Reported by: mjg
tychon [Fri, 8 Jun 2018 20:35:58 +0000 (20:35 +0000)]
Don't bother looking for non-executable pages when a process is
excluded from PTI.
Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15708
mmacy [Fri, 8 Jun 2018 20:31:59 +0000 (20:31 +0000)]
AF_UNIX: bring uipc_ready in compliance with new locking protocol
PR: 228742
Submitted by: markj
Reviewed by: markj
jtl [Fri, 8 Jun 2018 19:47:04 +0000 (19:47 +0000)]
Create a symlink for sodtor_set(9) to the socket(9) man page.
jtl [Fri, 8 Jun 2018 19:35:24 +0000 (19:35 +0000)]
Add a socket destructor callback. This allows kernel providers to set
callbacks to perform additional cleanup actions at the time a socket is
closed.
Michio Honda presented a use for this at BSDCan 2018.
(See https://www.bsdcan.org/2018/schedule/events/965.en.html .)
Submitted by: Michio Honda <micchie at sfc.wide.ad.jp> (previous version)
Reviewed by: lstewart (previous version)
Differential Revision: https://reviews.freebsd.org/D15706
mmacy [Fri, 8 Jun 2018 18:54:47 +0000 (18:54 +0000)]
hwpmc: yet another missed fixup
kib [Fri, 8 Jun 2018 18:32:26 +0000 (18:32 +0000)]
Restore release semantic for the old thread unlock on arm64.
With the introduction of pmap_switch(), the DSB instruction on the
address map switch is not necessary executed, which is fixed by
changing the unlock store to release. Also remove comment which
documented pre-pmap_switch() code.
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
mmacy [Fri, 8 Jun 2018 18:24:46 +0000 (18:24 +0000)]
hwpmc: remove hwpmc_xscale.c from corresponding arm build
adrian [Fri, 8 Jun 2018 18:21:57 +0000 (18:21 +0000)]
[ath_hal] Return failure if noise floor calibration fails.
If we fail noise floor calibration then we may end up with a deaf NIC
which we can't recover without a full chip reset.
Earlier chips seem to get less stuck in this condition versus AR9280/later
and AR9300/later, but whilst here just fix up the AR5212 era chips to also
return NF calibration failures.
This HAL routine would only return failure if the channel was not configured.
This is a no-op until the driver side code for doing resets and the HAL
code for being told about the reset type (and then handling it!) is
implemented.
Tested:
* AR9280, STA mode
* AR2425, STA mode
* AR9380, STA mode
adrian [Fri, 8 Jun 2018 18:15:23 +0000 (18:15 +0000)]
[ath_hal] Don't do ANI processing if we've reset.
If we've reset then we can't trust the current state of the ANI tracking,
so just wait until next time.
Tested:
* AR5424, STA mode (2GHz)
mmacy [Fri, 8 Jun 2018 18:09:19 +0000 (18:09 +0000)]
hwpmc: retire never completed xscale support
hwpmc xscale support is not actually functional and the
architecture is well past its shelf life.
markj [Fri, 8 Jun 2018 17:55:06 +0000 (17:55 +0000)]
Correct the list of supported drivers.
- bnxt(4) is supported via iflib.
- mlx4en(4) support has not yet been committed.
mmacy [Fri, 8 Jun 2018 17:41:49 +0000 (17:41 +0000)]
hwpmc: update files missed by r334827
sef [Fri, 8 Jun 2018 17:38:28 +0000 (17:38 +0000)]
This originated from ZFS On Linux, as
https://github.com/zfsonlinux/zfs/commit/
d4a72f23863382bdf6d0ae33196f5b5decbc48fd
During scans (scrubs or resilvers), it sorts the blocks in each transaction
group by block offset; the result can be a significant improvement. (On my
test system just now, which I put some effort to introduce fragmentation into
the pool since I set it up yesterday, a scrub went from 1h2m to 33.5m with the
changes.) I've seen similar rations on production systems.
Approved by: Alexander Motin
Obtained from: ZFS On Linux
Relnotes: Yes (improved scrub performance, with tunables)
Differential Revision: https://reviews.freebsd.org/D15562
mmacy [Fri, 8 Jun 2018 17:37:49 +0000 (17:37 +0000)]
avoid 'tcp_outflags defined but not used'
mmacy [Fri, 8 Jun 2018 17:37:43 +0000 (17:37 +0000)]
hpts: remove redundant decl breaking gcc build
brd [Fri, 8 Jun 2018 15:05:26 +0000 (15:05 +0000)]
Simplify this Makefile.
Approved by: bapt (mentor)
kevans [Fri, 8 Jun 2018 12:58:55 +0000 (12:58 +0000)]
bsdgrep(1): Evict character sequence that moved in
Reported by: trasz
mmacy [Fri, 8 Jun 2018 05:48:36 +0000 (05:48 +0000)]
unbreak LINT build after r334804
mmacy [Fri, 8 Jun 2018 05:48:28 +0000 (05:48 +0000)]
hwpmc: fix arm64 INVARIANTS build
mjg [Fri, 8 Jun 2018 05:40:36 +0000 (05:40 +0000)]
uma: fix up r334824
Turns out there is code which ends up passing M_ZERO to counters.
Since counters zero unconditionally on their own, just ignore drop the
flag in that place.
mmacy [Fri, 8 Jun 2018 05:17:06 +0000 (05:17 +0000)]
rtentry_zinit: don't blindly pass through M_ZERO to counter alloc
mmacy [Fri, 8 Jun 2018 05:01:09 +0000 (05:01 +0000)]
hwpmc: avoid undefined variable on LINT
mmacy [Fri, 8 Jun 2018 04:58:03 +0000 (04:58 +0000)]
hwpmc: simplify calling convention for hwpmc interrupt handling
pmc_process_interrupt takes 5 arguments when only 3 are needed.
cpu is always available in curcpu and inuserspace can always be
derived from the passed trapframe.
While facially a reasonable cleanup this change was motivated
by the need to workaround a compiler bug.
core2_intr(cpu, tf) ->
pmc_process_interrupt(cpu, ring, pmc, tf, inuserspace) ->
pmc_add_sample(cpu, ring, pm, tf, inuserspace)
In the process of optimizing the tail call the tf pointer was getting
clobbered:
(kgdb) up
at /storage/mmacy/devel/freebsd/sys/dev/hwpmc/hwpmc_mod.c:4709
4709 pmc_save_kernel_callchain(ps->ps_pc,
(kgdb) up
1205 error = pmc_process_interrupt(cpu, PMC_HR, pm, tf,
resulting in a crash in pmc_save_kernel_callchain.
mjg [Fri, 8 Jun 2018 04:18:42 +0000 (04:18 +0000)]
amd64: remove now unused bzero, bcmp and bcopy. move pagecopy higher up.
mjg [Fri, 8 Jun 2018 03:16:16 +0000 (03:16 +0000)]
uma: remove M_ZERO support for pcpu zones
Nothing in the tree uses it and pcpu zones have a fundamentally different use
case than the regular zones - they are not supposed to be allocated and freed
all the time.
This reduces pollution in the allocation fast path.
eadler [Fri, 8 Jun 2018 02:03:51 +0000 (02:03 +0000)]
top(1): remove some unneeded indirection
eadler [Fri, 8 Jun 2018 01:55:47 +0000 (01:55 +0000)]
top(1): fix several style & const related issues
- use parens for return
- put function names on newline
- sprinkle const where possible
kevans [Fri, 8 Jun 2018 01:25:07 +0000 (01:25 +0000)]
bsdgrep(1): Slooowly peel away the chunky onion
(or peel off the band-aid, whatever floats your boat)
This addresses two separate issues:
1.) Nothing within bsdgrep actually knew whether it cared about line numbers
or not.
2.) The file layer knew nothing about the context in which it was being
called.
#1 is only important when we're *not* processing line-by-line. #2 is
debatably a good idea; the parsing context is only handy because that's
where we store current offset information and, as of this commit, whether or
not it needs to be line-aware.
mjg [Fri, 8 Jun 2018 00:47:24 +0000 (00:47 +0000)]
amd64: fix a retarded bug in memset
memset fills the target buffer from a byte-sized value passed in as the
second argument.
The fully-sized (8 bytes) register containing it is named %rsi. Lower 4 bytes
can be referred to as %esi and finally the lowest byte is %sil.
Vast majority of all the callers just zero the target buffer and set it up by
doing xor %esi,%esi which has a side-effect of zeroing the upper parts of
the register as well. Some others do a word-sized move to %esi which has the
same result.
However, there are callers which only fill %sil. This does *not* clear up
the rest of the register.
The value of %rsi is multiplied by $0x0101010101010101 to create a 8-byte sized
pattern for 8-byte stores.
Prior to the patch, the func just blindly took %rsi assuming the unwanted bytes
are zeroed out. Since this is not the case for the callers which only play with
%sil (the rest of the register can have absolutely anything), the resulting
pattern can be garbage.
This has potential for funny bugs. One side effect (which was not amusing)
after enabling it instead of bzero was that the kernel was hanging on boot
as a xen domU.
Reported by: Trond Endrestøl <Trond.Endrestol fagskolen.gjovik.no>
Pointy hat: me
glebius [Fri, 8 Jun 2018 00:15:08 +0000 (00:15 +0000)]
UMA memory debugging enabled with INVARIANTS consists of two things:
trashing freed memory and checking that allocated memory is properly
trashed, and also of keeping a bitset of freed items. Trashing/checking
creates a lot of CPU cache poisoning, while keeping debugging bitsets
consistent creates a lot of contention on UMA zone lock(s). The performance
difference between INVARIANTS kernel and normal one is mostly attributed
to UMA debugging, rather than to all KASSERT checks in the kernel.
Add loader tunable vm.debug.divisor that allows either to turn off UMA
debugging completely, or turn it on only for a fraction of allocations,
while still running all KASSERTs in kernel. That allows to run INVARIANTS
kernels in production environments without reducing load by orders of
magnitude, but still doing useful extra checks.
Default value is 1, meaning debug every allocation. Value of 0 would
disable UMA debugging completely. Values above 1 enable debugging only
for every N-th item. It isn't possible to strictly follow the number,
but still amount of debugging is reduced roughly by (N-1)/N percent.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15199
glebius [Thu, 7 Jun 2018 22:38:40 +0000 (22:38 +0000)]
Add new functionality and syntax to cron(1) to allow to run jobs at a
given interval, which is counted in seconds since exit of the previous
invocation of the job. Example user crontab entry:
@25 sleep 10
The example will launch 'sleep 10' every 35 seconds. This is a rather
useless example above, but clearly explains the functionality.
The practical goal here is to avoid overlap of previous job invocation
to a new one, or to avoid too short interval(s) for jobs that last long
and doesn't have any point of immediate launch soon after previous run.
Another useful effect of interval jobs can be noticed when a cluster of
machines periodically communicates with a single node. Running the task
time based creates too much load on the node. Running interval based
spreads invocations across machines in cluster. Note that -j/-J won't
help in this case.
Sponsored by: Netflix
leitao [Thu, 7 Jun 2018 21:24:21 +0000 (21:24 +0000)]
Fix excise_initrd_region() to support 32- and 64-bit initrd params.
Changed excise_initrd_region to support both 32- and 64-bit
values for linux,initrd-start and linux,initrd-end.
This fixes the boot problem on some machines after rS334485.
Submitted by: Luis Pires <lffpires@ruabrasil.org>
Reviewed by: jhibbits, leitao
Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D15667
rrs [Thu, 7 Jun 2018 20:57:12 +0000 (20:57 +0000)]
Take out the stack alias inadvertantly added by my commit.
Reported by: Peter Lei
mckusick [Thu, 7 Jun 2018 20:49:01 +0000 (20:49 +0000)]
Ensure proper initialization of superblock.
Submitted by: Diane Bruce
rrs [Thu, 7 Jun 2018 19:57:55 +0000 (19:57 +0000)]
Fix build issue with const and volatile and the
myriad ways that the various compliers treat this. The
only safe prefetch appears to be for AMD. The other
compilers either are not volatile or are not const :(
Reported by: Michael Tuexen
bdrewery [Thu, 7 Jun 2018 19:39:11 +0000 (19:39 +0000)]
Use simpler sed invocation.
X-MFC-With: r334791
MFC after: 1 week
Submitted by: danfe
benno [Thu, 7 Jun 2018 18:59:32 +0000 (18:59 +0000)]
Break recursion involving getnewvnode and zfs_rmnode.
When we're at our vnode limit, getnewvnode will call into the vnode LRU
cache to free up vnodes. If the vnode we try to recycle is a ZFS vnode we
end up, eventually, in zfs_rmnode. If the ZFS vnode we're recycling
represents something with extended attributes, zfs_rmnode will call
zfs_zget which will attempt to allocate another vnode. If the next vnode we
try to recycle is also a ZFS vnode representing something with extended
attributes we can recurse further. This ends up being unbounded and can end
up overflowing the stack.
In order to avoid this, restructure zfs_rmnode to simply add the extended
attribute directory's object ID to the unlinked set, thus not requiring the
allocation of a vnode. We then schedule a task that calls zfs_unlinked_drain
which will do the work of properly marking the vnodes for unlinking.
zfs_unlinked_drain is also called on mount so these will be cleaned up
there.
Reviewed by: avg, mav
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15342
kevans [Thu, 7 Jun 2018 18:53:39 +0000 (18:53 +0000)]
netbsd-tests: bsdgrep(1): Add a test for -m, too
kevans [Thu, 7 Jun 2018 18:38:48 +0000 (18:38 +0000)]
bsdgrep(1): Don't initialize fts_flags twice
Admittedly, this is a clang-scan complaint... but it wasn't wrong. fts_flags
is initialized by all cases in the switch(), which should be fairly obvious.
Annotate this anyways.
kevans [Thu, 7 Jun 2018 18:36:12 +0000 (18:36 +0000)]
bsdgrep(1): whoops, garbage collect the now write-only variable
kevans [Thu, 7 Jun 2018 18:27:58 +0000 (18:27 +0000)]
bsdgrep(1): Do some less dirty things with return types
Neither procfile nor grep_tree return anything meaningful to their callers.
None of the callers actually care about how many lines were matched in all
of the files they processed; it's all about "did anything match?"
This is generally just a light refactoring to remind me of what actually
matters as I'm rewriting these bits to care less about 'stuff'.
marius [Thu, 7 Jun 2018 18:24:25 +0000 (18:24 +0000)]
- Once we have shifted arguments up to thrice, base-bits-dir is $1 rather
than $4. Introduce $BASEBITSDIR for clarity and to avoid repeating this
mistake in the future. Fixing this ensures that we pick up newly built
boot bits native to the target rather for/from the host.
- Apply some of the argument quoting fixes done in r287635 but missing in
later revisions.
rrs [Thu, 7 Jun 2018 18:18:13 +0000 (18:18 +0000)]
This commit brings in a new refactored TCP stack called Rack.
Rack includes the following features:
- A different SACK processing scheme (the old sack structures are not used).
- RACK (Recent acknowledgment) where counting dup-acks is no longer done
instead time is used to knwo when to retransmit. (see the I-D)
- TLP (Tail Loss Probe) where we will probe for tail-losses to attempt
to try not to take a retransmit time-out. (see the I-D)
- Burst mitigation using TCPHTPS
- PRR (partial rate reduction) see the RFC.
Once built into your kernel, you can select this stack by either
socket option with the name of the stack is "rack" or by setting
the global sysctl so the default is rack.
Note that any connection that does not support SACK will be kicked
back to the "default" base FreeBSD stack (currently known as "default").
To build this into your kernel you will need to enable in your
kernel:
makeoptions WITH_EXTRA_TCP_STACKS=1
options TCPHPTS
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D15525
kevans [Thu, 7 Jun 2018 18:06:01 +0000 (18:06 +0000)]
netbsd-tests: grep(1): Add test for -c flag
Someone might be inclined to accidentally break this. someone might have
written said test because they broke it locally.
kib [Thu, 7 Jun 2018 17:04:34 +0000 (17:04 +0000)]
Account for dmap limit when selecting the pages for the bootstrap
pagetables.
physmap[] can be inconsistent with the physical memory limit due to
buggy bios, or to the hw.physmem tunable. Since bootstrap pagetables
are initialized by accesses through the DMAP, we must ensure that DMAP
really cover the selected pages. This is only relevant when machine
has less than 4G RAM and buggy BIOS, which is the combination on Acer
Chromebook 720.
The call to mp_bootaddress() is moved later to have Maxmem initialized.
An alternative could be to always cover 4G for DMAP, but this change
seems to be simpler.
Reported and tested by: grembo
Reviewed by: royger
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D15675
bdrewery [Thu, 7 Jun 2018 16:16:22 +0000 (16:16 +0000)]
Stop using head(1) which is not available in installworld.
installworld should not be executing this anyhow but there is some
obscure case doing it still. The head(1) binary is not part of
ITOOLS and there's no need to add it.
MFC after: 1 week
Sponsored by: Dell EMC
leitao [Thu, 7 Jun 2018 15:59:08 +0000 (15:59 +0000)]
dev/ofw: Fix ofw_fdt_getprop() return values to match documentation
Fix the behavior of ofw_fdt_getprop() and ofw_fdt_getprop() functions to match
the documentation as the non-fdt code.
Submitted by: Luis Pires <lffpires@ruabrasil.org>
Reviewed by: manu, jhibbits
Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D15680
sbruno [Thu, 7 Jun 2018 15:27:07 +0000 (15:27 +0000)]
Unbreak dtrace runtime for udp after svn r334719 SO_REUSEPORT commit.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limeligght Networks
avg [Thu, 7 Jun 2018 14:46:52 +0000 (14:46 +0000)]
x86: reorganize code that deals with unexpected NMI-s
Expected NMI-s are those than are either generated by the software (such
as a CPU sending NMI to other CPU) or generated by the hardware after
the software configured it to do so (such as NMI-s on PMC events).
Some unexpected NMI-s can be caused by hardware failures and it is
possible to inquire the hardware about them (somewhat like MCA but much
more primitive) using an EISA mechanism. In some cases the origin of
the NMI can remain truly unknown.
This commit should not change any functionality. It just reorganizes
the code, so that it is easier to extend with new checks for the origin
of the NMI. Also, it frees the code that has nothing to do with ISA
from DEV_ISA.
MFC after: 3 weeks
avg [Thu, 7 Jun 2018 14:23:31 +0000 (14:23 +0000)]
expand descriptions of x86 panic_on_nmi and kdb_on_nmi sysctls
The descriptions were as terse as the variable names and they did not
explain additional conditions for knobs.
MFC after: 1 week
leitao [Thu, 7 Jun 2018 13:57:34 +0000 (13:57 +0000)]
md: use prestaged mfs_root
On PowerNV systems, the rootfs is passed through kexec, which loads the rootfs
into memory and set two fdt entries to describe where the file is located in
the memory;
I need to pass this memory region to the md device as a mfs_root, but, current
md driver does not support two things:
* Just getting a pointer from an external (bootloader) memory. If I need to
workaround it, I would need to declare a static array and memcopy from this
external memory to this static variable.
* The size of the image. The usage of mfs_root_end, which is not a pointer,
seems to be not possible for this prestaged scenario.
This patch simply adds a new way to load mfs_root from memory.
Differential Revision: https://reviews.freebsd.org/D15625
Approved by: kib, jhibbits (mentor)
jtl [Thu, 7 Jun 2018 13:29:54 +0000 (13:29 +0000)]
Fix a typo in vm_domain_set(). When a domain crosses into the severe range,
we need to set the domain bit from the vm_severe_domains bitset (instead
of clearing it).
Reviewed by: jeff, markj
Sponsored by: Netflix, Inc.
kp [Thu, 7 Jun 2018 13:16:53 +0000 (13:16 +0000)]
ipfw: fix status if ipfw.ko is not loaded
If the ipfw module is not loaded the net.inet.ip.fw.enable OID does not exist,
which leads the script to report errors and incorrectly report that ipfw is
enabled.
kp [Thu, 7 Jun 2018 13:14:09 +0000 (13:14 +0000)]
ipfw: fix whitespace
No functional changes.
erj [Thu, 7 Jun 2018 13:03:07 +0000 (13:03 +0000)]
iflib: Record TCP checksum info in iflib when TCP checksum is requested
ixl(4) (when it switches over to using iflib) devices need the TCP header
length in order to do TCP checksum offload.
Reviewed by: gallatin@, shurd@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D15558
hselasky [Thu, 7 Jun 2018 11:44:11 +0000 (11:44 +0000)]
Define ARCH_KMALLOC_MINALIGN in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
hselasky [Thu, 7 Jun 2018 11:41:42 +0000 (11:41 +0000)]
Wrap timespec64 into timespec in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
hselasky [Thu, 7 Jun 2018 11:34:59 +0000 (11:34 +0000)]
Move the EXPORT_SYMBOL_XXX() function macros into own header file.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
hselasky [Thu, 7 Jun 2018 11:29:07 +0000 (11:29 +0000)]
Implement the dev_pm_set_driver_flags() function macro in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
jhibbits [Thu, 7 Jun 2018 11:25:36 +0000 (11:25 +0000)]
Build nvme modules for powerpc, and install man pages
NVMe builds for powerpc now, so just build modules for all powerpc targets,
and install NVMe man pages for all powerpc targets.
alc [Thu, 7 Jun 2018 07:48:50 +0000 (07:48 +0000)]
When pidctrl_daemon() is called multiple times within an interval, it
should use the cumulative error to calculate the output.
mmacy [Thu, 7 Jun 2018 04:57:40 +0000 (04:57 +0000)]
AF_UNIX: check for unp == unp2 on disconnect
jhibbits [Thu, 7 Jun 2018 04:03:19 +0000 (04:03 +0000)]
Build nvmecontrol on powerpc64
The nvme driver is compiled for powerpc64 already, and the one fix required
to build nvmecontrol on powerpc64 was fixed in r334754.
jhibbits [Thu, 7 Jun 2018 04:02:09 +0000 (04:02 +0000)]
Print Maximum Data Transfer Size as a long rather than int
PowerPC has PAGE_SIZE as a long, not an int. This causes the compiler to throw
a format mismatch warning on this print. To work around the difference, print
it as a long instead of an int, and force the argument to a long.
Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D15653
mmacy [Thu, 7 Jun 2018 03:19:21 +0000 (03:19 +0000)]
libpmc: add missed (uintmax_t) casts
alc [Thu, 7 Jun 2018 02:54:11 +0000 (02:54 +0000)]
pidctrl_daemon() implements a variation on the classical, discrete PID
controller that tries to handle early invocations of the controller,
in other words, invocations before the expected end of the interval.
However, there were some calculation errors in this early invocation
case. Notably, if an early invocation occurred while the error was
negative, the derivative term was off by a large amount. One visible
effect of this error was that processes were being killed by the
virtual memory system's OOM killer when in fact there was plentiful
free memory.
Correct a couple minor errors in the sysctl descriptions, and apply
some style fixes.
Reviewed by: jeff, markj
mmacy [Thu, 7 Jun 2018 02:20:27 +0000 (02:20 +0000)]
hwpmc: don't do EMIT64 on constant