mav [Tue, 3 Feb 2015 08:06:59 +0000 (08:06 +0000)]
MFC r277419:
Allow skipping dmu_buf_will_dirty() call in dsl_dir_transfer_space().
dsl_dir_transfer_space() is mostly called after dsl_dir_diduse_space(),
which already calls dmu_buf_will_dirty() for the same dbuf and tx, so
its duplicate call in those cases will change nothing, only spend time.
Skipping this call by four times reduces time spent in dbuf_write_done()
and descendants, updating dataset statistics with several congested lock
acquisitions. When rewriting 8K zvol blocks at 1GB/s rate, this reduces
CPU time spent inside dbuf_write_done(), according to profiling, from 45%
of 683K samples to 18% of 422K.
ngie [Mon, 2 Feb 2015 08:04:38 +0000 (08:04 +0000)]
MFC r228099,r245171,r277939:
r228099:
- Create links to the xz and lzma versions even if BSD grep is not the
default. Nor GNU nor liblzma in base provides such functionality so
it may be useful.
r245171:
Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.
Obtained from: Juniper Networks
r277939:
Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no
dim [Sun, 1 Feb 2015 01:42:38 +0000 (01:42 +0000)]
MFC r273434 (by bapt):
Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world
mav [Thu, 29 Jan 2015 16:16:20 +0000 (16:16 +0000)]
MFC r276983: When aggregating TRIM segments, move the new one to the end.
New segment at the list head may block all TRIM requests until txg of that
segment can be processed. On my random I/O tests this change reduce peak
TRIM list length from 650 to 450 segments. Hopefully it should reduce TRIM
burstiness when list processing is unblocked.
hselasky [Tue, 20 Jan 2015 05:02:35 +0000 (05:02 +0000)]
MFC r276825 and r277372:
Allow a block size of zero to mean 512 bytes, which is the most common
block size for USB disks. This fixes support for "Action Cam SJ4000".
hselasky [Mon, 19 Jan 2015 07:03:40 +0000 (07:03 +0000)]
MFC r277044:
Increase the maximum number of dynamic USB quirks. USB memory stick
devices which don't support the synchronize cache SCSI command are
likely to also not support the prevent-allow medium removal SCSI
command.
np [Sun, 18 Jan 2015 20:39:24 +0000 (20:39 +0000)]
MFC r276959:
cxgb: replace r273280 with a more comprehensive fix.
Poll for link state when the link is down, even for interrupt capable
PHYs.
Allow PHYs to report a dubious "partial" link. If this state is seen 3
consecutive times (each check is ~1s apart) then reset the PHY. This is
a workaround for a situation where repeatedly toggling the link from the
peer gets the AEL2005 PHY into a state where it never establishes a PCS
block lock even when everything is in order.
dim [Sat, 17 Jan 2015 12:54:02 +0000 (12:54 +0000)]
MFC r276517:
Pull in r200010 from upstream libc++ trunk (by Marshall Clow):
Rename some internal templates to avoid conflict with complier
intrinsics. __is_constructible --> __libcpp_is_constructible,
__is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and
__is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No
functionality change.
Pull in r206805 from upstream libc++ trunk (by Marshall Clow):
Use compiler intrinsic __is_constructible if available
This should fix building parts of world with -std=c++11 enabled.
Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
dim [Sat, 17 Jan 2015 11:41:04 +0000 (11:41 +0000)]
MFC r277147:
Since the merge of file 5.21 in r276415 and r276416, stable/9 and
stable/10 cannot be built from FreeBSD 8.x. This is because the
build-tools stage requires libmagic, but lib/libmagic/config.h was
generated on head, and it now enables using the xlocale.h APIs, which
are not supported on 8.x (and on 9.x before __FreeBSD_version 900506).
See also the start of this thread on -stable:
https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html
To fix this, conditionalize the use of xlocale.h APIs to make
bootstrapping from older FreeBSD versions work correctly.
hselasky [Tue, 13 Jan 2015 17:16:06 +0000 (17:16 +0000)]
MFC r276749:
Fixes and updates for the Linux compatibility layer:
- Remove unsupported "bus" field from "struct pci_dev".
- Fix logic inside "pci_enable_msix()" when the number of allocated
interrupts are less than the number of available interrupts.
- Update header files included from "list.h".
- Ensure that "idr_destroy()" removes all entries before destroying
the IDR root node(s).
- Set the "device->release" function so that we don't leak memory at
device destruction.
- Use FreeBSD's "log()" function for certain debug printouts.
- Put parenthesis around arguments inside the min, max, min_t and max_t macros.
- Make sure we don't leak file descriptors by dropping the extra file
reference counts done by the FreeBSD kernel when calling falloc()
and fget_unlocked().
emaste [Mon, 12 Jan 2015 18:19:07 +0000 (18:19 +0000)]
Avoid ./ in zoneinfo entries in METALOG
Use of "find ." resulted in METALOG entries with an extra ./ -- e.g.,
./usr/share/zoneinfo/./America/Toronto. Avoid this by using globbing
via "find *" instead.
ngie [Sun, 11 Jan 2015 20:22:12 +0000 (20:22 +0000)]
MFC r276991:
MFC r275687,r275692:
Relnotes: yes
r275687:
Remove termcap entry reordering; install the file verbatim instead
termcap entry reordering requires ex (which is available via usr.bin/vi), which
breaks on build hosts where installworld is run with MK_VI == no (or when
make delete-old is run on ^/projects/building-blocks as vi, et al, are
removed on the branch when the knob is tweaked to => "no")
Reordering termcap was believed to improve performance, but the file is now
accessed via /etc/termcap.db, so /etc/termcap (and /usr/share/misc/termcap by
proxy) access is less preferred.
Reordering the file broke the historical comment <-> entry mapping as well,
which could muddle the purpose of entries in the file, so it could be
potentially harmful to readers in its reordered state.
Discussion took place on hackers@ here:
https://lists.freebsd.org/pipermail/freebsd-hackers/2014-December/046657.html
Fix building termcap.db when make obj is run beforehand from a clean tree by
using make variables for the filenames, which helps resolve pathing
appropriately when running cap_mkdb
nwhitehorn [Sun, 11 Jan 2015 17:18:14 +0000 (17:18 +0000)]
MFC r265329:
Disable ACPI and P4TCC throttling by default, following discussion on
freebsd-current. These CPU speed control techniques are usually unhelpful
at best. For now, continue building the relevant code into GENERIC so that
it can trivially be re-enabled at runtime if anyone wants it.
hselasky [Sun, 11 Jan 2015 14:30:50 +0000 (14:30 +0000)]
MFC r276823:
Add makefile for the "osmtest" utility. While at it:
- Fix depend target by removing a space after an "-I" inclusion option.
- Fix some minor compile issues in the "osmtest" utility.
hselasky [Sun, 11 Jan 2015 12:19:49 +0000 (12:19 +0000)]
MFC r276532 and r276626:
The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or
witness printouts in the console driver clients can cause this mutex
to recurse by calls to "printf()" from witness for example. In
particular this can happen if "debug.witness.skipspin=0" is set in the
boot environment.
hselasky [Sun, 11 Jan 2015 11:53:12 +0000 (11:53 +0000)]
MFC r251499, r271156, r276321, r276404, r276407, r276799 and r273376:
Various XHCI fixes and improvements:
- Add IDs for Intel Patsburg USB 2.0 controller (dependancy).
- Add support for polling the XHCI interrupt handler when
the regular interrupt handler is not working properly or
in case of MSI interrupts which are not yet supported.
Remove interrupt setup code for FreeBSD versions older
than 700031.
- Improve and fix MSI interrupt allocation, setup and release.
- Add missed flushing of data which can happen when "xhci_configure_mask()"
is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes
error feature is always enabled except for ISOCHRONOUS transfers.
- Allow systems having a page size greater than 4K to use fewer
scatter-gather XHCI TRB entries for its payload data. The XHCI
controller can handle at least 65536 bytes per scatter-gather list
entry.
- Add the Intel BayTrail USB device which needs port routing for USB 3.0.
dchagin [Sun, 11 Jan 2015 07:10:43 +0000 (07:10 +0000)]
MFC r276564, r276654:
Cast *path to silence clang -Wpointer-sign warning.
Instead of hiding the kern___getcwd() bug by bogus cast
in r276564, change path type to char * (pathnames are always char *).
And remove bogus casts of malloc().
kern___getcwd() internally doesn't actually use or support u_char *
paths, except to copy them to a normal char * path.
These changes are not visible to libc as libc/gen/getcwd.c misdeclares
__getcwd() as taking a plain char * path.
While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as
we always have sysproto.h.
r271480:
Set PKG_CACHEDIR to an 'All/' directory one level lower
to fix 'pkg repo' generating repository metadata for the
on-disc packages.
r271483:
Fix duplicate PKG_ABI in the PKG_CACHEDIR path.
r271491:
Simplify dvd package population with pkg-1.3.
r276765:
Update pkg-stage.sh to be compatible with pkg-1.4.x.
In 1.3.x and earlier, ABI format is, for example,
freebsd:11:x86:64.
In 1.4.x, ABI format is FreeBSD:11:amd64, and a new
configuration entry, ALTABI, is: freebsd:11:x86:64.
Export PKG_ABI and PKG_ALTABI accordingly, and if
PKG_ALTABI is set, create a symlink within the dvd
PKG_CACHEDIR so both new and old ABI directories
exist.
r276766:
Properly change directories before creating the
PKG_ALTABI -> PKG_ABI symlink.
r276820:
Print informational output when NOPORTS is set,
which would otherwise cause pkg-stage.sh to
silently exit.
r276822:
Ensure /var/run/ld-elf.so.hints exists before building
pkg(8).
r276827:
Ensure the ports directories exist for the list of
packages intended to be included on the DVD, and
remove any nonexistent ports from the final list.
Print the list of missing paths, and ensure that
DVD_PACKAGES is non-zero length (which should never
happen).
r276828:
Switch to x11/gnome3 now that x11/gnome2 no
longer exists in the ports tree.
stefanf [Thu, 8 Jan 2015 21:17:35 +0000 (21:17 +0000)]
Belatedly MFC r241440 and r241441:
Decode the first two fstab fields with strunvis(3). This allows having spaces
in devices and mount paths, encoded as \s or \040.
bapt [Thu, 8 Jan 2015 10:18:15 +0000 (10:18 +0000)]
MFS: r276576, r276594
Make texinfo a bootstrap tools this fixes cross building when makeinfo is not
available on the host
install-info is also needed for installworld so add it to the bootstrap tools
Add BPATH to the installworld path to ensure using installworld works if
install-info is not in base
rodrigc [Tue, 6 Jan 2015 08:03:01 +0000 (08:03 +0000)]
Merge r276744:
Use CURVNET macros inside inet_get_local_port_range() function.
Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup.
Certain necessary #include statements require LIST_HEAD.
Add these includes to ofed/include/linux/list.h, because
LIST_HEAD is specifically overridden in this file.
jilles [Sun, 4 Jan 2015 19:05:16 +0000 (19:05 +0000)]
MFC r274254: sh(1): Mention portability issue with shifting zero positional
parameters.
Per Austin Group issue #459, shifting zero positional parameters may or may
not be considered an operand error (which causes the shell to exit in most
cases).
bapt [Fri, 2 Jan 2015 18:32:53 +0000 (18:32 +0000)]
MFC: r276052,r276053
Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages
This manifested itself like the following when I was build testing an MFC
change on stable/10:
makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi -o regex.info
makeinfo: not found
*** [regex.info] Error code 127
make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error
rmacklem [Wed, 31 Dec 2014 01:38:02 +0000 (01:38 +0000)]
MFC: r276221
Delete some duplicate code that was harmless because
exactly the same code is at the end of the nfscl_checksattr()
function that is called just before it. As such, this code
had already been executed and didn't do anything.
rmacklem [Wed, 31 Dec 2014 01:34:37 +0000 (01:34 +0000)]
MFC: r276193
A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
was reported via email. This was caused by a LOR between the
sleep lock used to serialize the local locking (nfsrv_locklf())
and locking the vnode. I believe this patch fixes the problem
by delaying relocking of the vnode until the sleep lock is
unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side
effect of unlocking the vnode, unlocking the vnode was moved to before
the functions that call nfsvno_advlock().
It shouldn't affect the execution of the default case where
vfs.nfsd.enable_locallocks=0.
rmacklem [Wed, 31 Dec 2014 01:29:44 +0000 (01:29 +0000)]
MFC: r276192, r276200
Modify vop_stdadvlock{async}() so that it only
locks/unlocks the vnode and does a VOP_GETATTR()
for the SEEK_END case. This is safe to do, since
lf_advlock{async}() only uses the size argument
for the SEEK_END case.
The NFSv4 server needs this when
vfs.nfsd.enable_locallocks!=0 since locking the
vnode results in a LOR that can cause a deadlock
for the nfsd threads.