]> xenbits.xensource.com Git - people/liuw/freebsd.git/log
people/liuw/freebsd.git
9 years ago- Replace semaphore-base locking with sleep/wait synchronization:
gonzo [Sun, 8 Nov 2015 03:34:19 +0000 (03:34 +0000)]
- Replace semaphore-base locking with sleep/wait synchronization:
    sema_trywait/sema_timedwait can't be used while holding
    non-sleepable mutex

- Fix infinite loop if response from VideoCore never received

9 years agoIntegrate tools/regression/lib/libc/locale into the FreeBSD test suite
ngie [Sun, 8 Nov 2015 02:06:17 +0000 (02:06 +0000)]
Integrate tools/regression/lib/libc/locale into the FreeBSD test suite
as lib/libc/tests/locale

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd a manual page for PHOLD() and friends.
markj [Sun, 8 Nov 2015 01:41:44 +0000 (01:41 +0000)]
Add a manual page for PHOLD() and friends.

MFC after: 1 week

9 years ago- Consistently use PROC_ASSERT_HELD() to verify that a process' hold count
markj [Sun, 8 Nov 2015 01:38:56 +0000 (01:38 +0000)]
- Consistently use PROC_ASSERT_HELD() to verify that a process' hold count
  is non-zero.
- Include the process address in the PROC_ASSERT_HELD() and
  PROC_ASSERT_NOT_HELD() assertion messages so that the corresponding
  process can be found easily when debugging.

MFC after: 1 week

9 years agoEnsure that deactivated pages that are not expected to be reused are
markj [Sun, 8 Nov 2015 01:36:18 +0000 (01:36 +0000)]
Ensure that deactivated pages that are not expected to be reused are
reclaimed in FIFO order by the pagedaemon.  Previously we would enqueue
such pages at the head of the inactive queue, yielding a LIFO reclaim order.

Reviewed by: alc
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoRegen after r290526 for WITH_CCACHE_BUILD.
bdrewery [Sun, 8 Nov 2015 00:54:41 +0000 (00:54 +0000)]
Regen after r290526 for WITH_CCACHE_BUILD.

9 years agoAdd built-in ccache build support via WITH_CCACHE_BUILD option.
bdrewery [Sun, 8 Nov 2015 00:50:18 +0000 (00:50 +0000)]
Add built-in ccache build support via WITH_CCACHE_BUILD option.

ccache is mostly beneficial for frequent builds where -DNO_CLEAN is not
used to achieve a safe pseudo-incremental build.  This is explained in
more detail upstream [1] [2].  It incurs about a 20%-28% hit to populate the
cache, but with a full cache saves 30-50% in build times.  When combined with
the WITH_FAST_DEPEND feature it saves up to 65% since ccache does cache the
resulting dependency file, which it does not do when using mkdep(1)/'CC
-E'.  Stats are provided at the end of this message.

This removes the need to modify /etc/make.conf with the CC:= and CXX:=
lines which conflicted with external compiler support [3] (causing the
bootstrap compiler to not be built which lead to obscure failures [4]),
incorrectly invoked ccache in various stages, required CCACHE_CPP2 to avoid
Clang errors with parenthesis, and did not work with META_MODE.

The option name was picked to match the existing option in ports.  This
feature is available for both in-src and out-of-src builds that use
/usr/share/mk.

Linking, assembly compiles, and pre-processing avoid using ccache since it is
only overhead.  ccache does nothing special in these modes, although there is
no harm in calling it for them.

CCACHE_COMPILERCHECK is set to 'content' when using the in-tree bootstrap
compiler to hash the content of the compiler binary to determine if it
should be a cache miss.  For external compilers the 'mtime' option is used
as it is more efficient and likely to be correct.  Future work may optimize the
'content' check using the same checks as whether a bootstrap compiler is needed
to be built.

The CCACHE_CPP2 pessimization is currently default in our devel/ccache
port due to Clang requiring it.  Clang's -Wparentheses-equality,
-Wtautological-compare, and -Wself-assign warnings do not mix well with
compiling already-pre-processed code that may have expanded macros that
trigger the warnings.  GCC has so far not had this issue so it is allowed to
disable the CCACHE_CPP2 default in our port.

Sharing a cache between multiple checkouts, or systems, is explained in
the ccache manual.  Sharing a cache over NFS would likely not be worth
it, but syncing cache directories between systems may be useful for an
organization.  There is also a memcached backend available [5].  Due to using
an object directory outside of the source directory though you will need to
ensure that both are in the same prefix and all users use the same layout.  A
possible working layout is as follows:
  Source: /some/prefix/src1
  Source: /some/prefix/src2
  Source: /some/prefix/src3
  Objdir: /some/prefix/obj
  Environment: CCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj'
This will use src*/../obj as the MAKEOBJDIRPREFIX and tells ccache to replace
all absolute paths to be relative.  Using something like this is required due
to -I and -o flags containing both SRC and OBJDIR absolute paths that ccache
adds into its hash for the object without CCACHE_BASEDIR.

distcc can be hooked into by setting CCACHE_PREFIX=/usr/local/bin/distcc.
I have not personally tested this and assume it will not mix well with
using the bootstrap compiler.

The cache from buildworld can be reused in a subdir by first running
'make buildenv' (from r290424).

Note that the cache is currently different depending on whether -j is
used or not due to ccache enabling -fdiagnostics-color automatically if
stderr is a TTY, which bmake only does if not using -j.

The system I used for testing was:
  WITNESS
  Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_CCACHE_BUILD=yes
  DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log.
        The arc was fully populated with src tree files and ccache objects.
  RAM: 76GiB
  CPU: Intel(R) Xeon(R) CPU L5520 @2.27GHz
       2 package(s) x 4 core(s) x 2 SMT threads = hw.ncpu=16

The WITH_FAST_DEPEND feature was used for comparison here as well to show
the dramatic time savings with a full cache.

buildworld:
  x buildworld-before
  + buildworld-ccache-empty
  * buildworld-ccache-full
  % buildworld-ccache-full-fastdep
  # buildworld-fastdep
  +-------------------------------------------------------------------------------+
  |%            *                               #                                +|
  |%            *                               #                                +|
  |%            *                               #             xxx                +|
  |                                                           |A                  |
  |                                                                              A|
  |             A                                                                 |
  |A                                                                              |
  |                                             A                                 |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3       3744.13       3794.31       3752.25     3763.5633     26.935139
  +   3          4519       4525.04       4520.73       4521.59     3.1104823
  Difference at 95.0% confidence
          758.027 +/- 43.4565
          20.1412% +/- 1.15466%
          (Student's t, pooled s = 19.1726)
  *   3       1823.08        1827.2       1825.62        1825.3     2.0785572
  Difference at 95.0% confidence
          -1938.26 +/- 43.298
          -51.5007% +/- 1.15045%
          (Student's t, pooled s = 19.1026)
  %   3       1266.96       1279.37       1270.47     1272.2667     6.3971113
  Difference at 95.0% confidence
          -2491.3 +/- 44.3704
          -66.1952% +/- 1.17895%
          (Student's t, pooled s = 19.5758)
  #   3       3153.34       3155.16        3154.2     3154.2333    0.91045776
  Difference at 95.0% confidence
          -609.33 +/- 43.1943
          -16.1902% +/- 1.1477%
          (Student's t, pooled s = 19.0569)

buildkernel:
  x buildkernel-before
  + buildkernel-ccache-empty
  * buildkernel-ccache-empty-fastdep
  % buildkernel-ccache-full
  # buildkernel-ccache-full-fastdep
  @ buildkernel-fastdep
  +-------------------------------------------------------------------------------+
  |#                        @   %                  *                              |
  |#                        @   %                  *     x                      + |
  |#                        @   %                  *     xx                     ++|
  |                                                      MA                       |
  |                                                                             MA|
  |                                                A                              |
  |                             A                                                 |
  |A                                                                              |
  |                         A                                                     |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3        571.57        573.94        571.79     572.43333     1.3094401
  +   3        727.97        731.91        728.06     729.31333     2.2492295
  Difference at 95.0% confidence
          156.88 +/- 4.17129
          27.4058% +/- 0.728695%
          (Student's t, pooled s = 1.84034)
  *   3         527.1        528.29        528.08     527.82333    0.63516402
  Difference at 95.0% confidence
          -44.61 +/- 2.33254
          -7.79305% +/- 0.407478%
          (Student's t, pooled s = 1.02909)
  %   3         400.4        401.05        400.62        400.69     0.3306055
  Difference at 95.0% confidence
          -171.743 +/- 2.16453
          -30.0023% +/- 0.378128%
          (Student's t, pooled s = 0.954969)
  #   3        201.94        203.34        202.28        202.52    0.73020545
  Difference at 95.0% confidence
          -369.913 +/- 2.40293
          -64.6212% +/- 0.419774%
          (Student's t, pooled s = 1.06015)
  @   3        369.12        370.57         369.3     369.66333    0.79033748
  Difference at 95.0% confidence
          -202.77 +/- 2.45131
          -35.4225% +/- 0.428227%
          (Student's t, pooled s = 1.0815)

[1] https://ccache.samba.org/performance.html
[2] http://www.mail-archive.com/ccache@lists.samba.org/msg00576.html
[3] https://reviews.freebsd.org/D3484
[5] https://github.com/jrosdahl/ccache/pull/30

PR: 182944 [4]
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Relnotes: yes

9 years agoFAST_DEPEND: Don't enable when .MAKE.MODE=meta.
bdrewery [Sun, 8 Nov 2015 00:50:13 +0000 (00:50 +0000)]
FAST_DEPEND: Don't enable when .MAKE.MODE=meta.

This is because the .meta files generated from filemon already contain a
list of all files read to generate the object.

X-MFC-With: r290433
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFAST_DEPEND: Don't include depend files when using 'make -V'.
bdrewery [Sun, 8 Nov 2015 00:50:09 +0000 (00:50 +0000)]
FAST_DEPEND: Don't include depend files when using 'make -V'.

This is especially noticeable in the kernel obj directory since it
includes so many files.

X-MFC-With: r290433
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd a hack to workaround ZSH as BUILDENV_SHELL breaking CPUTYPE.
bdrewery [Sun, 8 Nov 2015 00:50:06 +0000 (00:50 +0000)]
Add a hack to workaround ZSH as BUILDENV_SHELL breaking CPUTYPE.

ZSH considers CPUTYPE a magic variable that will be the output of 'uname -m'
even if already set in environment when starting up.

The CPUTYPE?= check in Makefile.inc1 and supporting overriding CPUTYPE
manually in the buildenv shell make automatic workarounds too tricky
here.  ZSH should really respect variables set in the environment before
trashing them.

X-MFC-With: r290423
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix alignment of the short month names for CJK locales,
ume [Sat, 7 Nov 2015 23:54:14 +0000 (23:54 +0000)]
Fix alignment of the short month names for CJK locales,
as far as I could edit them.

9 years agopf: Fix broken rule skip calculation
kp [Sat, 7 Nov 2015 23:51:42 +0000 (23:51 +0000)]
pf: Fix broken rule skip calculation

r289932 accidentally broke the rule skip calculation. The address family
argument to PF_ANEQ() is now important, and because it was set to 0 the macro
always evaluated to false.
This resulted in incorrect skip values, which in turn broke the rule
evaluations.

9 years agosavecore(8): Be quiet unless the user asks for verbose
cem [Sat, 7 Nov 2015 23:27:03 +0000 (23:27 +0000)]
savecore(8): Be quiet unless the user asks for verbose

Make savecore(8) more suitable for init-time scripts; be quiet by default.

Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3229

9 years agohptmv(4): Fix broken sysctl(9) API assumptions
cem [Sat, 7 Nov 2015 23:05:23 +0000 (23:05 +0000)]
hptmv(4): Fix broken sysctl(9) API assumptions

Sponsored by: EMC / Isilon Storage Division

9 years agoCorrect !FDT case with proper name.
imp [Sat, 7 Nov 2015 22:58:56 +0000 (22:58 +0000)]
Correct !FDT case with proper name.

9 years agoFix build of localedef(1) on arm where wchar_t is an unsigned int
bapt [Sat, 7 Nov 2015 22:57:00 +0000 (22:57 +0000)]
Fix build of localedef(1) on arm where wchar_t is an unsigned int

9 years agoImplement the phy-mode property for ate and macb. If it is set to
imp [Sat, 7 Nov 2015 22:52:06 +0000 (22:52 +0000)]
Implement the phy-mode property for ate and macb. If it is set to
"rmii", use rmii mode for the MAC, otherwise use MII mode. The code is
somewhat duplicated between these drivers for this.

Also, add AT91RM9200 compatibility strings to the ate driver. In the
future, there's a good chance that ate will lose the MACB support and
only attach to the AT91RM9200 EMAC device since the macb works now
that RMII support has been added to it.

9 years agoperiodic: Fix backwards compatibility for daily_status_security_* vars.
jilles [Sat, 7 Nov 2015 22:06:49 +0000 (22:06 +0000)]
periodic: Fix backwards compatibility for daily_status_security_* vars.

Most daily_status_security_* variables in periodic.conf were changed to
security_status_* in SVN r254974. The compatibility code for the old names
did not work.

PR: 204331
Submitted by: martin at lispworks.com
MFC after: 1 week

9 years agoRewrite the histoty part
bapt [Sat, 7 Nov 2015 21:07:40 +0000 (21:07 +0000)]
Rewrite the histoty part
Fix information about "Dragonfly-style" format which on freebsd is named
BSD-style

Noted by: bdrewery

9 years agoImprove localedef(1) manpage
bapt [Sat, 7 Nov 2015 20:36:54 +0000 (20:36 +0000)]
Improve localedef(1) manpage

Obtained from: DragonflyBSD

9 years agoBump warning level
bapt [Sat, 7 Nov 2015 20:31:23 +0000 (20:31 +0000)]
Bump warning level

9 years agoUse const where needed instead of using pragmas to work around the warnings
bapt [Sat, 7 Nov 2015 20:29:23 +0000 (20:29 +0000)]
Use const where needed instead of using pragmas to work around the warnings

9 years agoMake bsd declaration static
bapt [Sat, 7 Nov 2015 20:27:31 +0000 (20:27 +0000)]
Make bsd declaration static

9 years agoAdd support for RMII in macb, cribbed slightly from the ate
imp [Sat, 7 Nov 2015 20:02:07 +0000 (20:02 +0000)]
Add support for RMII in macb, cribbed slightly from the ate
driver. This is taken from the MAC at boot, but can be overridden with
'options AT91_MACB_USE_RMII'.

Switch to macb for HL201 and SAM9G20EK boards. It now works both
places. Also start to sneak up on FDT for the SAM9G20EK board, but
leave disabled due to issues with MMC that haven't been resolved.
Add early debug support for the SAM9G20EK since that is required
for FDT to work presently on these SoC.

9 years agoFix an off by one due to bad conversion from avl(3) to tree(3)
bapt [Sat, 7 Nov 2015 19:54:40 +0000 (19:54 +0000)]
Fix an off by one due to bad conversion from avl(3) to tree(3)
Readd calloc as it was not the issue just the messenger

Submitted by: dim
Found by: Address Sanitizer

9 years agoRework r290504.
mav [Sat, 7 Nov 2015 19:33:57 +0000 (19:33 +0000)]
Rework r290504.

9 years agoSpecify VP when sending a marker.
mav [Sat, 7 Nov 2015 19:03:47 +0000 (19:03 +0000)]
Specify VP when sending a marker.

9 years agoFlesh out sysctl types further (follow-up of r290475)
cem [Sat, 7 Nov 2015 18:26:32 +0000 (18:26 +0000)]
Flesh out sysctl types further (follow-up of r290475)

Use the right intmax_t type instead of intptr_t in a few remaining
places.

Add support for CTLFLAG_TUN for the new fixed with types.  Bruce will be
upset that the new handlers silently truncate tuned quad-sized inputs,
but so do all of the existing handlers.

Add the new types to debug_dump_node, for whatever use that is.

Bump FreeBSD_version again, for good measure.  We are changing
SYSCTL_HANDLER_ARGS and a member of struct sysctl_oid to intmax_t.

Correct the sysctl typed NULL values for the fixed-width types.  (Hat
tip: hps@.)

Suggested by: hps (partial)
Sponsored by: EMC / Isilon Storage Division

9 years agoMake ISP_SLEEP() really sleep instead of spinning.
mav [Sat, 7 Nov 2015 18:26:02 +0000 (18:26 +0000)]
Make ISP_SLEEP() really sleep instead of spinning.

While there, simplify the wait logic.

9 years agoAdd a note about the inpact on databases of the changes in collation support
bapt [Sat, 7 Nov 2015 17:54:51 +0000 (17:54 +0000)]
Add a note about the inpact on databases of the changes in collation support

Reported by: girgen

9 years agoRun memset only after having checked the return of malloc
bapt [Sat, 7 Nov 2015 16:45:51 +0000 (16:45 +0000)]
Run memset only after having checked the return of malloc

Submitted by: pluknet

9 years agoWorkaround an issue on i386 to unbreak the build until the real issue is tracked
bapt [Sat, 7 Nov 2015 16:22:29 +0000 (16:22 +0000)]
Workaround an issue on i386 to unbreak the build until the real issue is tracked
down

9 years agoFix build on arm64
bapt [Sat, 7 Nov 2015 15:03:45 +0000 (15:03 +0000)]
Fix build on arm64

9 years agoStop enforcing LC_COLLATE to C unicode collation is now supported
bapt [Sat, 7 Nov 2015 12:50:20 +0000 (12:50 +0000)]
Stop enforcing LC_COLLATE to C unicode collation is now supported

9 years agoAdd an UPDATING entry about the changed of behaviour for listed files due to
bapt [Sat, 7 Nov 2015 12:48:29 +0000 (12:48 +0000)]
Add an UPDATING entry about the changed of behaviour for listed files due to
now supporting correctly string collation

9 years agoBump __FreeBSD_version modification of the locales
bapt [Sat, 7 Nov 2015 12:45:52 +0000 (12:45 +0000)]
Bump __FreeBSD_version modification of the locales

9 years agoImprove collation string and locales support
bapt [Sat, 7 Nov 2015 12:43:35 +0000 (12:43 +0000)]
Improve collation string and locales support

Merge collation support from Illumos and DragonflyBSD.

Locales are now generated with the new localedef(1) tool from CLDR POSIX files.
The generated files are now identified as "BSD 1.0" format.

The libc now only read "BSD 1.0" locales definitions, all other version will be
set to "C"
The localedef(1) tool has been imported from Illumos and modified to use tree(3)
instead of the CDDL avl(3)
A set of tool created by edwin@ and extended by marino@ for dragonfly has been
added to be able to generate locales and the Makefiles from the vanilla CLDR
unicode databases + a universal UTF-8 charmap (by marino@)
Update the locales to unicode v27
Given our regex(3) does not support multibyte (yet) it has been forced to always
use locale C
Remove now unused colldef(1) and mklocale(1)
Finish implementing the numeric BSD extension for ctypes
The number of supported locales has grown from 175 to 250 locales. Among the new
locales: 6 Arabic locales (AE EG JO MA QA SA), Different variations of spanish
locales.
Added new 3 components locales for mn_Cyrl_MN, sr_Cyrl_RS sr_Latn_RS,
zh_Hans_CN, zh_Hant_HK and zh_Hant_TW. Some aliases has been for 2 components
version when possible.

Thanks: Garrett D'Amore (Illumos) who made sure all his work was done under
BSD license!, Edwin Groothuis (edwin@) for the work he made on tools to be able
to generate locales definition usable in freebsd sources out of vanilla CLDR
definitions, John Marino (DragonflyBSD) who first merge the Illumos work into
Dragonfly and spent hours tracking down bugs.

9 years agoCorrect the argument type in the sysctl_add_oid(9) prototype. On
kib [Sat, 7 Nov 2015 12:33:30 +0000 (12:33 +0000)]
Correct the argument type in the sysctl_add_oid(9) prototype.  On
ILP32 machines, intptr_t and intmax_t are different types.

Submitted by: skra

9 years agoMove intmax_t and uintmax_t type declarations to sys/_stdint.h to give
kib [Sat, 7 Nov 2015 12:30:43 +0000 (12:30 +0000)]
Move intmax_t and uintmax_t type declarations to sys/_stdint.h to give
it an exposure needed for use in sys/sysctl.h.

Suggested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoFix encryption error handling.
takawata [Sat, 7 Nov 2015 12:15:02 +0000 (12:15 +0000)]
Fix encryption error handling.
Close l2cap connection on encryption error.

9 years agoAdd missing header
bapt [Sat, 7 Nov 2015 12:11:17 +0000 (12:11 +0000)]
Add missing header

9 years agoAdd helper function to check if a USB page cache buffer is properly
hselasky [Sat, 7 Nov 2015 11:40:35 +0000 (11:40 +0000)]
Add helper function to check if a USB page cache buffer is properly
aligned to reduce the use of bounce buffers in PIO mode.

MFC after: 1 week

9 years agoCatchup with latest changes for ObsoleteFiles in case base is built using
bapt [Sat, 7 Nov 2015 11:28:25 +0000 (11:28 +0000)]
Catchup with latest changes for ObsoleteFiles in case base is built using
WITHOUT_LOCALE knob

9 years agoReadd LOCALEDIR definition removed by accident
bapt [Sat, 7 Nov 2015 11:26:14 +0000 (11:26 +0000)]
Readd LOCALEDIR definition removed by accident

9 years agoUnify setting lladdr for AF_INET[6].
melifaro [Sat, 7 Nov 2015 11:12:00 +0000 (11:12 +0000)]
Unify setting lladdr for AF_INET[6].

9 years agoFix typo
bapt [Sat, 7 Nov 2015 11:08:19 +0000 (11:08 +0000)]
Fix typo

9 years agoMerge from head r290483
bapt [Sat, 7 Nov 2015 11:02:33 +0000 (11:02 +0000)]
Merge from head r290483

9 years agoarm64: build em(4) and igb(4) modules
emaste [Sat, 7 Nov 2015 04:49:39 +0000 (04:49 +0000)]
arm64: build em(4) and igb(4) modules

Sponsored by: The FreeBSD Foundation

9 years agoarm64: add igb(4) to GENERIC
emaste [Sat, 7 Nov 2015 04:46:34 +0000 (04:46 +0000)]
arm64: add igb(4) to GENERIC

We have em(4) in GENERIC already and so also supporting the related
igb(4) makes sense.

Sponsored by: The FreeBSD Foundation

9 years agoAdd a sched_yield() to work around low memory conditions in the current code.
adrian [Sat, 7 Nov 2015 04:04:00 +0000 (04:04 +0000)]
Add a sched_yield() to work around low memory conditions in the current code.

Things seem to get stuck in low memory conditions where no bufs are available,
the reclamation path is called to wakeup the daemon, but no sleeping is done.
Because of this, we are stuck in a tight loop in the current process and
never run said reclamation path.

This was introduced in r289279 . This is only a temporary workaround
to restore system usefulness until the more permanent solutions can be
found.

Tested:

* Carambola2, 64MB (and 32MB by manual config.)

9 years agoProtecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1
bapt [Sat, 7 Nov 2015 02:18:19 +0000 (02:18 +0000)]
Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1
edition 2013. No need anymore to disable the protection if one set
the POXILY_CORRECT environment variable.

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4092

9 years agoFinal follow-up to r290475: Bump __FreeBSD_version
cem [Sat, 7 Nov 2015 02:03:06 +0000 (02:03 +0000)]
Final follow-up to r290475: Bump __FreeBSD_version

Because we changed sysctl_add_oid(9) ABI, which surely breaks ABI
compatibility for out-of-tree modules.

Sponsored by: EMC / Isilon Storage Division

9 years agoImprove soelim(1) manpages
bapt [Sat, 7 Nov 2015 01:58:23 +0000 (01:58 +0000)]
Improve soelim(1) manpages

Submitted by: Sascha Wildner <saw@online.de>

9 years agoAnother follow-up to r290475: Bump .Dd in sysctl_add_oid.9
cem [Sat, 7 Nov 2015 01:58:17 +0000 (01:58 +0000)]
Another follow-up to r290475: Bump .Dd in sysctl_add_oid.9

Sponsored by: EMC / Isilon Storage Division

9 years agoFollow-up to r290475: Add sysctl(8) support for added types
cem [Sat, 7 Nov 2015 01:56:32 +0000 (01:56 +0000)]
Follow-up to r290475: Add sysctl(8) support for added types

Sponsored by: EMC / Isilon Storage Division

9 years agoRound out SYSCTL macros to the full set of fixed-width types
cem [Sat, 7 Nov 2015 01:43:01 +0000 (01:43 +0000)]
Round out SYSCTL macros to the full set of fixed-width types

Add S8, S16, S32, and U32 types;  add SYSCTL*() macros for them, as well
as for the existing 64-bit types.  (While SYSCTL*QUAD and UQUAD macros
already exist, they do not take the same sort of 'val' parameter that
the other macros do.)

Clean up the documented "types" in the sysctl.9 document.  (These are
macros and thus not real types, but the manual page documents intent.)

The sysctl_add_oid(9) arg2 has been bumped from intptr_t to intmax_t to
accommodate 64-bit types on 32-bit pointer architectures.

This is just the kernel support piece; the userspace sysctl(1) support
will follow in a later patch.

Submitted by: Ravi Pokala <rpokala@panasas.com>
Reviewed by: cem
Relnotes: no
Sponsored by: Panasas
Differential Revision: https://reviews.freebsd.org/D4091

9 years agoath(4) - reflect whether this is a full or fast channel change.
adrian [Sat, 7 Nov 2015 00:51:51 +0000 (00:51 +0000)]
ath(4) - reflect whether this is a full or fast channel change.

It's no longer "outdoor."

9 years agofd: implement kern.proc.nfds sysctl
mjg [Sat, 7 Nov 2015 00:18:14 +0000 (00:18 +0000)]
fd: implement kern.proc.nfds sysctl

Intended purpose is to provide an equivalent of OpenBSD's getdtablecount
syscall for the compat library..

9 years agoSet correct code for signal in abort_align() routine.
skra [Fri, 6 Nov 2015 23:17:00 +0000 (23:17 +0000)]
Set correct code for signal in abort_align() routine.
Remove superfluous printf() and both unnecessary and obsolete comments.

Approved by: kib (mentor)

9 years ago[netinet6]: Create a new IPv6 netisr which expects the frames to have been verified.
adrian [Fri, 6 Nov 2015 23:07:43 +0000 (23:07 +0000)]
[netinet6]: Create a new IPv6 netisr which expects the frames to have been verified.

This is required for fragments and encapsulated data (eg tunneling) to be redistributed
to the RSS bucket based on the eventual IPv6 header and protocol (TCP, UDP, etc) header.

* Add an mbuf tag with the state of IPv6 options parsing before the frame is queued
  into the direct dispatch handler;
* Continue processing and complete the frame reception in the correct RSS bucket /
  netisr context.

Testing results are in the phabricator review.

Differential Revision: https://reviews.freebsd.org/D3563
Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn>

9 years agoAdd maintainer entries for llvm, lldb, compiler-rt, libc++ and libcxxrt.
dim [Fri, 6 Nov 2015 22:24:41 +0000 (22:24 +0000)]
Add maintainer entries for llvm, lldb, compiler-rt, libc++ and libcxxrt.

9 years agoUse the correct length. The wrong one was too large.
tuexen [Fri, 6 Nov 2015 22:08:05 +0000 (22:08 +0000)]
Use the correct length. The wrong one was too large.

MFC after: 3 days

9 years agoThe 'buildenv' target can safely be ran with '+'.
bdrewery [Fri, 6 Nov 2015 21:49:17 +0000 (21:49 +0000)]
The 'buildenv' target can safely be ran with '+'.

9 years agoSwitch zfs_panic_recover to panic for bad DVA
smh [Fri, 6 Nov 2015 20:45:19 +0000 (20:45 +0000)]
Switch zfs_panic_recover to panic for bad DVA

As reported by Coverity a null pointer de-reference panic would be triggered
when zfs_recover was set so switch to straight panic as it can never be
recovered.

Reported by: Coverity Scan
MFC after: 1
X-MFC-With: r290401
Sponsored by: Multiplay

9 years agoInclude opt_platform.h to get FDT defined.
cognet [Fri, 6 Nov 2015 20:12:31 +0000 (20:12 +0000)]
Include opt_platform.h to get FDT defined.

9 years agoAlways check the return value of lseek.
asomers [Fri, 6 Nov 2015 19:18:20 +0000 (19:18 +0000)]
Always check the return value of lseek.

This is a follow-up to r289845, which only fixed one occurence of CID
1009429.

Coverity CID: 1009429
Reviewed by: markj
MFC after: 2 weeks
X-MFC-With: r289845
Sponsored by: Spectra Logic
Differential Revision: https://reviews.freebsd.org/D4096

9 years agoRemoved unused malloc types.
mav [Fri, 6 Nov 2015 18:50:01 +0000 (18:50 +0000)]
Removed unused malloc types.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

9 years agoFix a typo. I did not mean it, really.
jkim [Fri, 6 Nov 2015 18:24:49 +0000 (18:24 +0000)]
Fix a typo.  I did not mean it, really.

9 years agoClean up OpenSSL makefiles.
jkim [Fri, 6 Nov 2015 17:39:17 +0000 (17:39 +0000)]
Clean up OpenSSL makefiles.

9 years agoRefresh my entries
des [Fri, 6 Nov 2015 17:29:51 +0000 (17:29 +0000)]
Refresh my entries

9 years agoAdd two more KASSERTs.
mav [Fri, 6 Nov 2015 17:29:21 +0000 (17:29 +0000)]
Add two more KASSERTs.

9 years agoMake interrupt dispatching MP safe. Use GPU interrupt bit in per-core
skra [Fri, 6 Nov 2015 17:12:33 +0000 (17:12 +0000)]
Make interrupt dispatching MP safe. Use GPU interrupt bit in per-core
interrupt status register to process shared interrupts only if the bit
is active and only on core to which they are routed.

Reviewed by: imp, loos
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D3723

9 years agoI am still maintaining iscsi, nvme, nvd and nvmecontrol.
jimharris [Fri, 6 Nov 2015 16:54:17 +0000 (16:54 +0000)]
I am still maintaining iscsi, nvme, nvd and nvmecontrol.

9 years agoI still maintain sh(1).
jilles [Fri, 6 Nov 2015 16:43:22 +0000 (16:43 +0000)]
I still maintain sh(1).

9 years agozfsboottest: catch up with r241289, call zfs_spa_init() for all found pools
avg [Fri, 6 Nov 2015 16:27:22 +0000 (16:27 +0000)]
zfsboottest: catch up with r241289, call zfs_spa_init() for all found pools

MFC after: 8 days

9 years agozfsboottest: build as a 32 bit application
avg [Fri, 6 Nov 2015 16:26:09 +0000 (16:26 +0000)]
zfsboottest: build as a 32 bit application

For better emulation of the actual zfs boot code.

MFC after: 8 days

9 years agoAdd sysctl to control LACP strict compliance default
smh [Fri, 6 Nov 2015 15:33:27 +0000 (15:33 +0000)]
Add sysctl to control LACP strict compliance default

Add net.link.lagg.lacp.default_strict_mode which defines
the default value for LACP strict compliance for created
lagg devices.

Also:
* Add lacp_strict option to ifconfig(8).
* Fix lagg(4) creation examples.
* Minor style(9) fix.

MFC after: 1 week

9 years agoDo not truncate addresses when printing in encoded format.
ume [Fri, 6 Nov 2015 14:50:23 +0000 (14:50 +0000)]
Do not truncate addresses when printing in encoded format.

9 years agoMark the thunder_mdio_fdt driver as early, the bgx needs it to exist so it
andrew [Fri, 6 Nov 2015 14:40:51 +0000 (14:40 +0000)]
Mark the thunder_mdio_fdt driver as early, the bgx needs it to exist so it
can find the network phy.

Sponsored by: ABT Systems Ltd

9 years agoMark the arm64 nexus devices to be attached early. This allows multipass
andrew [Fri, 6 Nov 2015 14:36:21 +0000 (14:36 +0000)]
Mark the arm64 nexus devices to be attached early. This allows multipass
to work correctly. Without it the pass quickly moves to the final pass
before the nexus device attaches.

Sponsored by: ABT Systems Ltd

9 years ago- Fix alignment for padding link address.
ume [Fri, 6 Nov 2015 14:35:22 +0000 (14:35 +0000)]
- Fix alignment for padding link address.
- Trim whitespace of link address.

9 years agoThe field modifier for trimming whitespace
ume [Fri, 6 Nov 2015 14:29:25 +0000 (14:29 +0000)]
The field modifier for trimming whitespace
is not `q' but `t'.

9 years agoThe field sinfo_timetolive should have been sinfo_pr_value.
tuexen [Fri, 6 Nov 2015 14:00:26 +0000 (14:00 +0000)]
The field sinfo_timetolive should have been sinfo_pr_value.
Thanks to Jens Hoelscher for making me aware of the bug.

MFC after: 1 week

9 years agoFix typos in field names of struct sctp_extrcvinfo.
tuexen [Fri, 6 Nov 2015 13:08:16 +0000 (13:08 +0000)]
Fix typos in field names of struct sctp_extrcvinfo.
Provide defines to allow applications to compile.
Thanks to Jens Hoelscher for making me aware of the typos.

MFC after: 1 week

9 years agoFix for unaligned IP-header.
hselasky [Fri, 6 Nov 2015 12:54:27 +0000 (12:54 +0000)]
Fix for unaligned IP-header.

The mbuf length fields must be set before m_adj() is called else
m_adj() will not always adjust the mbuf and an unaligned read
exception can trigger inside the network stack. This can happen on
platforms where unaligned reads are not supported. Adjust a length
check to include the 2-byte ethernet alignment while at it.

MFC after: 3 days

9 years agoCorrect posix_openpt reference in pty(3)
smh [Fri, 6 Nov 2015 12:02:24 +0000 (12:02 +0000)]
Correct posix_openpt reference in pty(3)

MFC after: 1 week
Sponsored by: Multiplay

9 years agourtwn(4): simplify urtwn_tsf_sync_enable().
avos [Fri, 6 Nov 2015 11:29:24 +0000 (11:29 +0000)]
urtwn(4): simplify urtwn_tsf_sync_enable().

- Drop TSF initialization; device can discover it without our help.
- Do not touch R92C_BCN_CTRL_EN_BCN bit in STA mode.
- Add 'static' keyword for function definition.

Tested with RTL8188EU, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3801

9 years agoifconfig: fix padding for '<ifname> scan' command output
avos [Fri, 6 Nov 2015 11:17:23 +0000 (11:17 +0000)]
ifconfig: fix padding for '<ifname> scan' command output
(S:N and beacon interval fields).

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4085

9 years agoFix compiling netstat after r290367 by substituting sys/types.h for
ngie [Fri, 6 Nov 2015 08:43:12 +0000 (08:43 +0000)]
Fix compiling netstat after r290367 by substituting sys/types.h for
sys/param.h, as sys/param.h defines the MAX(..) macro

Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
Pointyhat to: ume

9 years agoRegenerate for WITH_FAST_DEPEND in r290433.
bdrewery [Fri, 6 Nov 2015 05:32:18 +0000 (05:32 +0000)]
Regenerate for WITH_FAST_DEPEND in r290433.

9 years agoDon't allow environment-set options to bleed into src.conf.5 generation.
bdrewery [Fri, 6 Nov 2015 05:28:08 +0000 (05:28 +0000)]
Don't allow environment-set options to bleed into src.conf.5 generation.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoWrite 2- and 4-byte aligned values as single writes in ddb(4)
jhibbits [Fri, 6 Nov 2015 04:56:52 +0000 (04:56 +0000)]
Write 2- and 4-byte aligned values as single writes in ddb(4)

On the mpc85xx SoC family, writes to any part of a word in the CCSR affect the
full word.  This prevents single-byte writes from taking the desired effect.

Code copied directly from ARM.

9 years agoAdd a FAST_DEPEND option, off by default, which speeds up the build significantly.
bdrewery [Fri, 6 Nov 2015 04:45:29 +0000 (04:45 +0000)]
Add a FAST_DEPEND option, off by default, which speeds up the build significantly.

This speeds up buildworld by 16% on my system and buildkernel by 35%.

Rather than calling mkdep(1), which is just a wrapper around 'cc -E',
use the modern -MD -MT -MF flags to gather and generate dependencies during
compilation.  This flag was introduced in GCC "a long time ago", in GCC 3.0,
and is also supported by Clang.  (It appears that ICC also supports this but I
do not have access to test it).  This avoids running the preprocessor *twice*
for every build, in both 'make depend' and 'make all'.  This is especially
noticeable when using ccache since it does not cache preprocessor results from
mkdep(1) / 'cc -E', but still speeds up compilation with the -MD flags.

For 'make depend' a tree-walk is still done to ensure that all DPSRCS
are generated when expected, and that beforedepend/afterdepend and
_EXTRADEPEND are all still respected.  In time this may change but for now
I've been conservative.  The time for a tree-walk with -j combined with
SUBDIR_PARALLEL is not significant.  For example, it takes about 9 seconds
with -j15 to walk all of src/ for 'make depend' now on my system.

A .depend file is still generated with the various rules that apply to
the final target, or custom rules.  Otherwise there are now
per-built-object-file .depend files, such as .depend.filename.o.  These
are included directly by make rather than populating .depend with a loop
and .depend lines, which only added overhead to the now almost-NOP 'make
depend' phase.

Before this I experimented with having mkdep(1) called in parallel per-file.
While this improved the kernel and lib/libc 'make depend' phase, it resulted
in slower build times overall.

The -M flags are removed from CFLAGS when linking since they have no effect.

Enabling this by default, for src or out-of-src, can be done once more testing
has been done, such as a ports exp-run, and with more compilers.

The system I used for testing was:
  WITNESS
  Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_FAST_DEPEND=yes
  DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log.
        The arc was fully populated with src tree files.
  RAM: 76GiB
  CPU: Intel(R) Xeon(R) CPU L5520 @2.27GHz
       2 package(s) x 4 core(s) x 2 SMT threads = hw.ncpu=16

buildworld:
  x buildworld-before
  + buildworld-fastdep
  +-------------------------------------------------------------------------------+
  |+                                                                              |
  |+                                                                              |
  |+                                                                       xx    x|
  |                                                                       |_MA___||
  |A                                                                              |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3       3744.13       3794.31       3752.25     3763.5633     26.935139
  +   3       3153.34       3155.16        3154.2     3154.2333    0.91045776
  Difference at 95.0% confidence
          -609.33 +/- 43.1943
          -16.1902% +/- 1.1477%
          (Student's t, pooled s = 19.0569)

buildkernel:
  x buildkernel-before
  + buildkernel-fastdep
  +-------------------------------------------------------------------------------+
  |+                                                                            x |
  |++                                                                           xx|
  |                                                                             A||
  |A|                                                                             |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3        571.57        573.94        571.79     572.43333     1.3094401
  +   3        369.12        370.57         369.3     369.66333    0.79033748
  Difference at 95.0% confidence
          -202.77 +/- 2.45131
          -35.4225% +/- 0.428227%
          (Student's t, pooled s = 1.0815)

Sponsored by: EMC / Isilon Storage Division
MFC after: 3 weeks
Relnotes: yes

9 years agootus(4) - add flags for RX filter, configuration and sniffer.
adrian [Fri, 6 Nov 2015 03:09:26 +0000 (03:09 +0000)]
otus(4) - add flags for RX filter, configuration and sniffer.

Obtained from: Linux carl9170

9 years agoAdd SUBDIR_PARALLEL.
bdrewery [Fri, 6 Nov 2015 00:06:10 +0000 (00:06 +0000)]
Add SUBDIR_PARALLEL.

None of these libraries depend on each other.

Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
MFC after: 2 weeks

9 years agoUpdate MAINTAINERS file to reflect re (gjb) wants to review changes
gjb [Thu, 5 Nov 2015 23:28:48 +0000 (23:28 +0000)]
Update MAINTAINERS file to reflect re (gjb) wants to review changes
to release.sh

Sponsored by: The FreeBSD Foundation

9 years agoWhen dumping an rman in DDB, include the RID of each resource.
jhb [Thu, 5 Nov 2015 23:12:23 +0000 (23:12 +0000)]
When dumping an rman in DDB, include the RID of each resource.

Submitted by: Ravi Pokala (rpokala@panasas.com)
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4086

9 years agoremove \, it confuses things.
adrian [Thu, 5 Nov 2015 22:50:21 +0000 (22:50 +0000)]
remove \, it confuses things.

9 years agoiwn(4): various simple fixes
avos [Thu, 5 Nov 2015 22:44:36 +0000 (22:44 +0000)]
iwn(4): various simple fixes

- Fix mbuf leaks in iwn_raw_xmit() and iwn_xmit_task()
(regression since r288178).
- Check IWN_FLAG_RUNNING flag under lock.
- Remove m->m_pkthdr.rcvif initialization (fixed in r283994).
- Enclose some values in return statements into parentheses.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4069

9 years agoCorrect a comment which appears to be mistakingly mechanically changed in r265420.
bdrewery [Thu, 5 Nov 2015 22:42:40 +0000 (22:42 +0000)]
Correct a comment which appears to be mistakingly mechanically changed in r265420.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division