Commit Graph

202961 Commits

Author SHA1 Message Date
Alan Cox
cff0a327b8 Stop describing an acquire operation as a read barrier and a release
operation as a write barrier.  That description has never been correct,
and it has caused confusion.  An acquire operation orders writes as well
as reads, and a release operation orders reads as well as writes.

Also, explicitly say that a thread doesn't see its own accesses being
reordered.  The reordering of a thread's accesses is only (potentially)
visible to another thread.  Thus, memory barriers need only be used to
control the ordering of accesses between threads, not within a thread.

Reviewed by:	bde, kib
Discussed with:	jhb
MFC after:	1 week
2015-08-14 17:49:03 +00:00
Ian Lepore
46d49ed78e Use simple fixed name strings for these timecounters and eventimers which
are tied to fixed pieces of hardware; dynamic string formatting isn't needed.
2015-08-14 16:48:07 +00:00
Pedro F. Giffuni
842898ceec Remove a stale comment and clarify the original where it was taken from
The comment in the libc/sys symbol map referenced the generated symbols
for the syscall trampolines. Such comment was out of place in the secure
symbol map so remove the stale comment and attempt to clarify the old one
to avoid risks of confusion.

Pointed out by:	kib
2015-08-14 14:58:04 +00:00
Michael Tuexen
faadc1b492 Allow the path MTU to grow up to the outgoing interface MTU.
MFC after: 3 days
2015-08-14 14:26:13 +00:00
Hans Petter Selasky
e4344dae5b Handle NYET high speed tokens and predict NAK'ing is up next.
MFC after:	2 weeks
2015-08-14 14:20:10 +00:00
Andrew Turner
6d16fc0687 Use __builtin_clzll to count the leading zero bits, the data is based on
long long so __builtin_clz will return an incorrect value.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D3375
2015-08-14 14:17:04 +00:00
Hans Petter Selasky
7462a4dda1 Minor code refactor to avoid duplicating code.
MFC after:	2 weeks
2015-08-14 13:58:18 +00:00
Konstantin Belousov
0a44024a4e Comment only change, fix grammar and somewhat clarify the action.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-08-14 13:51:59 +00:00
Alexander Motin
d8928f479b Remove some random accumulated diff from Illumos.
Submitted by:	avg (partially)
2015-08-14 13:43:12 +00:00
Baptiste Daroussin
5770ce6f1d Regression: fix pw usermod -w xxx
Reported by:	gjb
2015-08-14 13:39:55 +00:00
Alexander Motin
6cb8dbf791 2618 arc.c mistypes in the comments
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bart Coddens <bart.coddens@gmail.com>

illumos/illumos-gate@fc98fea58e
2015-08-14 13:10:30 +00:00
Hans Petter Selasky
43ea03d756 Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.

Description of problem:
USB transfers can process data in their callbacks sometimes causing
unacceptable latency for other USB transfers. Separate BULK completion
callbacks from CONTROL, INTERRUPT and ISOCHRONOUS callbacks, and give
BULK completion callbacks lesser execution priority than the
others. This way USB audio won't be interfered by heavy USB ethernet
usage for example.

Further serve USB transfer completion in a round robin fashion,
instead of only serving the most CPU hungry. This has been done by
adding a third flag to USB transfer queue structure which keeps track
of looping callbacks. The "command" callback function then decides
what to do when looping.

MFC after:		2 weeks
2015-08-14 12:57:53 +00:00
Alexander Motin
997d864ce0 Fix r286766 build with debug. 2015-08-14 11:47:53 +00:00
Andrew Turner
edc2af7807 Add support for bus_space_read_region and bus_space_write_region. This is
needed for the dwc USB controller driver.

Sponsored by:	ABT Systems Ltd
2015-08-14 09:55:25 +00:00
Alexander Motin
ab4d08c3d3 Fix minor mismerge sometimes earlier. 2015-08-14 09:48:23 +00:00
Alexander Motin
5ba12a280a MFV r286765: 5817 change type of arcs_size from uint64_t to refcount_t
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@2fd872a734

As a way to make it more difficult to introduce bugs into the ARC, and to
make it easier to diagnose issues when bugs do creep in, it would be
beneficial to change the type of the arc_state_t's arcs_size field to be
a refcount_t instead of a uint64_t. This would allow us to make stricter
checks when incrementing and decrementing the value with debugging enabled,
but still fallback to simple, fast atomic operations when debugging is
disabled.
2015-08-14 09:39:23 +00:00
Alexander Motin
b415867594 5817 change type of arcs_size from uint64_t to refcount_t
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@2fd872a734

As a way to make it more difficult to introduce bugs into the ARC, and to
make it easier to diagnose issues when bugs do creep in, it would be
beneficial to change the type of the arc_state_t's arcs_size field to be
a refcount_t instead of a uint64_t. This would allow us to make stricter
checks when incrementing and decrementing the value with debugging enabled,
but still fallback to simple, fast atomic operations when debugging is
disabled.
2015-08-14 09:37:54 +00:00
Alexander Motin
ab4930d98c MFV r285025: 6033 arc_adjust() should search MFU lists for oldest buffer
when adjusting MFU size.

illumos/illumos-gate@31c46cf23c

https://www.illumos.org/issues/6033
  When we're looking for the list containing oldest buffer we never
  actually look at the MFU lists even when we try to evict from MFU.
  looks like a copy paste error, the fix is here:

Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Xin Li <delphij@delphij.net>
Reviewed by: Prakash Surya <me@prakashsurya.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Alek Pinchuk <alek@nexenta.com>
Obtained from:  illumos
2015-08-14 09:33:46 +00:00
Alexander Motin
e0360e14d2 MFV r277431: 5497 lock contention on arcs_mtx
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@244781f10d

This patch attempts to reduce lock contention on the current arc_state_t
mutexes. These mutexes are used liberally to protect the number of LRU
lists within the ARC (e.g. ARC_mru, ARC_mfu, etc). The granularity at
which these locks are acquired has been shown to greatly affect the
performance of highly concurrent, cached workloads.
2015-08-14 09:31:07 +00:00
Alexander Motin
267b62ec43 Revert part of r205231, introducing multiple ARC state locks.
This local implementation will be replaced by one from Illumos to reduce
code divergence and make further merges easier.
2015-08-14 09:25:54 +00:00
Pedro F. Giffuni
fe0d386cf3 Move the stack protector to a new "secure" directory
As part of the code refactoring to support FORTIFY_SOURCE we want
a new subdirectory "secure" to keep the files related to security.
Move the stack protector functions to this new directory.

No functional change.

Differential Review:	https://reviews.freebsd.org/D3333
2015-08-14 03:03:13 +00:00
Marcelo Araujo
6a182dddd9 Make clear the bcopy(3) manpage regards when it was marked as LEGACY
as well as when it was removed from POSIX specification.

Reviewed by:		theraven, wblock, bapt, rodrigc
Approved by:		bapt, rodrigc (mentor)
Differential Revision:	D3374
2015-08-14 01:27:30 +00:00
Edwin Groothuis
6790a2583c MFV of 286748,tzdata2015f
Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)
2015-08-13 23:57:44 +00:00
Edwin Groothuis
dd8f55dee6 Vendor import of tzdata2015f:
Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)

Obtained from: ftp://ftp.iana.org/tz/releases/
2015-08-13 23:57:00 +00:00
Warner Losh
39d3a8449c Spell binaries in the customary way.
Submitted by: jhb@
2015-08-13 22:32:42 +00:00
Antoine Brodin
55f80482d4 Stop removing ELF toolchain tools 2015-08-13 22:04:30 +00:00
Marcel Moolenaar
c68ea8a640 s/as/at/ in previous commit.
Pointed out by: jmallett@
2015-08-13 19:12:55 +00:00
Ed Maste
13d06fd808 Remove arm64 workaround for Clang 3.4 crash 2015-08-13 19:05:18 +00:00
Xin LI
fb90888521 Plug a memory leak.
MFC after:	2 weeks
2015-08-13 18:45:52 +00:00
Dimitry Andric
5bf328b6f4 Avoid left-shifting negative signed values in bxe(4).
Reviewed by:	davidcs
MFC after:	3 days
2015-08-13 18:24:41 +00:00
Ed Maste
9ff63d2432 Remove remnant of WITHOUT_ELFTOOLCHAIN_TOOLS missed in r286730 2015-08-13 18:01:50 +00:00
Ed Maste
84465e31bd Update src.conf(5) after r286730 2015-08-13 17:54:28 +00:00
Ed Maste
1bc28ffccd Roll WITHOUT_ELFTOOLCHAIN_TOOLS into WITHOUT_TOOLCHAIN
The option was added only to ease the transition from GNU Binutils to
ELF Tool Chain tools, and that process is now complete (for the viable
replacements). Noting the removal in UPDATING is sufficient as we have
not shipped a release with the option.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3240
2015-08-13 17:50:47 +00:00
Christian Brueffer
d3c2497cab Small cleanup.
- fix mandoc -Tlint warnings
- use appropriate macros
- canonize FreeBSD spelling
2015-08-13 16:11:04 +00:00
Ian Lepore
4159fbab87 Add a new PPS driver for AM335x (beaglebone) timer hardware. This can be
used as a module or compiled-in.
2015-08-13 15:19:30 +00:00
Marcel Moolenaar
cc787e3d0e Change md(4) to use weak symbols as start, end and size for the embedded
root disk. The embedded image is linked into the kernel in the .mfs
section.

Add rules and variables to kern.pre.mk and kern.post.mk that handle the
linking of the image. First objcopy is used to generate an object file.
Then, the object file is linked into the kernel.

Submitted by:	Steve Kiernan <stevek@juniper.net>
Reviewed by:	brooks@
Obtained from: Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D2903
2015-08-13 15:16:34 +00:00
Marcel Moolenaar
ea205656bd Instead of having separate do_sync functions for ARM_ARCH 6 vs.
ARM_ARCH >= 7, use the dmb() macro defined in machine/atomic.h

Submitted by:	Steve Kiernan <stevek@juniper.net>
Reviewed by:	imp@
Differential Revision:	https://reviews.freebsd.org/D3355
2015-08-13 14:53:29 +00:00
Marcel Moolenaar
5b44efcf47 The Broadcom BCM56060 chip has a Cortex-A9R4 core.
Submitted by:	Steve Kiernan <stevek@juniper.net>
Reviewed by:	imp@
Differential Revision:	https://reviews.freebsd.org/D3357
2015-08-13 14:50:11 +00:00
Ian Lepore
ca64e4807e Constify the pointers to eventtimer and timecounter name strings.
The need for this appears as soon as you try to set the names to something
that isn't a "quoted literal".  (I'm actually confused why quoted strings
aren't a problem as well, we must have some warning disabled.)
2015-08-13 14:43:25 +00:00
Marcel Moolenaar
6280434f9a Fix text mode operation.
We first map 64KB at 0xA0000 and then determine whether to work
in text or graphics mode.  When graphics mode, the mapping is
precisely what we need and everything is fine.  But text mode,
has the frame buffer relocated to 0xB8000. We didn't map that
much to safely add 0x18000 bytes to the base address.

Now we first check whether to work in text or graphics mode and
then map the frame buffer at the right address and with the
right size (0xA0000+64KB for graphics, 0xB8000+32KB for text).

PR:		202276
Tested by:	ed@
2015-08-13 14:43:11 +00:00
Alexander V. Chernikov
f3bfa7d1cf Move lle update code from from gigantic ip_arpinput() to
separate bunch of functions. The goal is to isolate actual lle
updates to permit more fine-grained locking.

Do all lle link-level update under AFDATA wlock.

Sponsored by:	Yandex LLC
2015-08-13 13:38:09 +00:00
Ed Maste
ccd285e76c arm64: turn unknown el0 exception into a SIGILL
It seems we get EXCP_UNKNOWN from QEMU when executing zeroed memory.
Print a register dump here and signal illegal instruction. Also print
a register dump for other invalid exceptions, before panic.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3370
2015-08-13 13:21:00 +00:00
Andrey V. Elsukov
ec170744a7 Use g_conf_printf_escaped() to escape illegal symbols in file name.
PR:		202289
MFC after:	1 week
2015-08-13 13:20:29 +00:00
Alexander Motin
0aedf4e812 Revert part of r280687, reporting "1" (true) for empty value.
For example, it made gpart partitions without label report "1" as label.

PR:		202089
MFC after:	3 days
2015-08-13 13:19:56 +00:00
Peter Wemm
6d57346a39 Add missing cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c that
was left out of r286705.

Forgotten by:  mav
2015-08-13 05:42:56 +00:00
Marcelo Araujo
07c1d44f87 Use nitems instead of "sizeof ypaliases/sizeof ypaliases[0]".
Make the if statement more expressive.

Differential Revision:	D3366
Reviewed by:		ed
Approved by:		bapt, rodrigc (mentor)
2015-08-13 02:36:37 +00:00
Marcelo Araujo
9b71470214 Remove the mention of memcpy(3) that is build on top of bcopy(3).
Fix some phrases to make it more clear.

Differential Revision:	D3378
Reported by:		bde@
Reviewed by:		wblock
Approved by:		bapt, rodrigc (mentor)
Sponsored by:		gandi.net
2015-08-13 02:31:23 +00:00
Alexander Motin
49114ce463 MFV 286711: 6096 ZFS_SMB_ACL_RENAME needs to cleanup better
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@8f5190a540
2015-08-13 00:13:55 +00:00
Alexander Motin
449cfe5537 6096 ZFS_SMB_ACL_RENAME needs to cleanup better
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@8f5190a540
2015-08-13 00:12:52 +00:00
Alexander Motin
3b1f51e911 MFV 286709:
6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@0f92170f1e
2015-08-13 00:10:36 +00:00