Commit Graph

16689 Commits

Author SHA1 Message Date
Mark Murray
e866d8f05b Make the UMA harvesting go away completely if not wanted. Default to "not wanted".
Provide and document the RANDOM_ENABLE_UMA option.

Change RANDOM_FAST to RANDOM_UMA to clarify the harvesting.

Remove RANDOM_DEBUG option, replace with SDT probes. These will be of
use to folks measuring the harvesting effect when deciding whether to
use RANDOM_ENABLE_UMA.

Requested by:	scottl and others.
Approved by:	so (/dev/random blanket)
Differential Revision:    https://reviews.freebsd.org/D3197
2015-08-22 12:59:05 +00:00
Xin LI
1bb0c0bd8d Fix build when LEAPSECONDS is enabled.
MFC after:	2 weeks
2015-08-22 07:41:28 +00:00
Luiz Otavio O Souza
0a70aaf8f5 Add ALTQ(9) support for the CoDel algorithm.
CoDel is a parameterless queue discipline that handles variable bandwidth
and RTT.

It can be used as the single queue discipline on an interface or as a sub
discipline of existing queue disciplines such as PRIQ, CBQ, HFSC, FAIRQ.

Differential Revision:	https://reviews.freebsd.org/D3272
Reviewd by:	rpaulo, gnn (previous version)
Obtained from:	pfSense
Sponsored by:	Rubicon Communications (Netgate)
2015-08-21 22:02:22 +00:00
Warner Losh
10df57f9cf Document bsd.compiler.mk and the variables it defines. 2015-08-21 19:51:27 +00:00
Warner Losh
67ad267bf2 Document CFLAGS_NO_SIMD. 2015-08-21 19:51:19 +00:00
Enji Cooper
40fd4efd1a Fix typos (depreciated -> deprecated) 2015-08-21 17:45:18 +00:00
Warner Losh
8243a00c04 Document bsd.arch.inc.mk. 2015-08-21 16:05:56 +00:00
Baptiste Daroussin
b005264e84 Mark bsd.info.mk as depreciated 2015-08-21 15:30:50 +00:00
Warner Losh
009572a6f9 Document bsd.progs.mk, including its status as being strongly
discouraged and that it will be going away as soon as is practicable.
2015-08-21 15:15:22 +00:00
Bryan Drewery
75824a7b3e Remove reference to non-existent kern_openat(9).
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2015-08-20 22:14:43 +00:00
Bryan Drewery
7ec1b6b672 Add link for rw_unlock(9) to rwlock(9).
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2015-08-20 18:22:06 +00:00
Luiz Otavio O Souza
3df058ffaf Add the GPIO driver for the ADI Engineering RCC-VE and RCC-DFF/DFFv2.
This driver allows read the software reset switch state and control the
status LEDs.

The GPIO pins have their direction (input/output) locked down to prevent
possible short circuits.

Note that most people get a reset button that is a hardware reset.  The
software reset button is available on boards from Netgate.

Sponsored by:	Rubicon Communications (Netgate)
2015-08-18 21:05:56 +00:00
Ed Maste
084748985d Separate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP
For most cases they are equivalent, but BINUTILS_BOOTSTRAP is a
BROKEN_OPTION on arm64 as the in-tree GNU binutils do not support it,
so we need a separate internal flag for ELF Tool Chain.

Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3381
2015-08-17 10:48:55 +00:00
Mark Murray
646041a89a Add DEV_RANDOM pseudo-option and use it to "include out" random(4)
if desired.

Retire randomdev_none.c and introduce random_infra.c for resident
infrastructure. Completely stub out random(4) calls in the "without
DEV_RANDOM" case.

Add RANDOM_LOADABLE option to allow loadable Yarrow/Fortuna/LocallyWritten
algorithm.  Add a skeleton "other" algorithm framework for folks
to add their own processing code. NIST, anyone?

Retire the RANDOM_DUMMY option.

Build modules for Yarrow, Fortuna and "other".

Use atomics for the live entropy rate-tracking.

Convert ints to bools for the 'seeded' logic.

Move _write() function from the algorithm-specific areas to randomdev.c

Get rid of reseed() function - it is unused.

Tidy up the opt_*.h includes.

Update documentation for random(4) modules.

Fix test program (reviewers, please leave this).

Differential Revision:    https://reviews.freebsd.org/D3354
Reviewed by:              wblock,delphij,jmg,bjk
Approved by:              so (/dev/random blanket)
2015-08-17 07:36:12 +00:00
Sean Bruno
38be29d321 Add capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain adatpers.
Linux has been doing the exact same thing since 2008

eb7c3adb1c

PR:	161277
Differential Revision:	https://reviews.freebsd.org/D3282
Submitted by:	Fravadona@gmail.com
Reviewed by:	erj wblock
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Limelight Networks
2015-08-16 19:06:23 +00:00
Enji Cooper
b3667a140d Regen src.conf.5 per r286822 2015-08-16 10:10:58 +00:00
Enji Cooper
edefff7ed6 Reap MK_SYSINSTALL
It's no longer in use in the tree (most likely missed when sade/sysinstall
were removed)

MFC after: 1 week
2015-08-16 09:51:24 +00:00
Baptiste Daroussin
fcb92d50f7 Update to use the latest version of the PCI IDs Repository.
MFC after:	1 week
2015-08-15 12:55:06 +00:00
Mariusz Zaborski
347a39b4a6 Add support for the arrays in nvlist library.
- Add
  nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
  descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_array_next field to the nvlist structure.
  If an array is added by the nvlist_{move,add}_nvlist_array function
  this field will contains next element in the array.
- Add the nitems field to the nvpair and nvpair_header structure.
  This field contains number of elements in the array.
- Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of
  an array.
- Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only
  on packing/unpacking.
- Add new API for traversing arrays (nvlist_get_array_next).
- Add the nvlist_get_pararr function which combines the
  nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in
  the array it will return next element from array. If nvlist is last
  element in array or it isn't in array it will return his
  container (parent). This function should simplify traveling over nvlist.
- Add tests for new features.
- Add documentation for new functions.
- Add my copyright.
- Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.

PR:		191083
Reviewed by:	allanjude (doc)
Approved by:	pjd (mentor)
2015-08-15 06:34:49 +00:00
Rui Paulo
60c07d1ce3 bsd.lib.mk: pass NMFLAGS to the lorder script. 2015-08-14 22:55:23 +00:00
Rui Paulo
25ec8c921c Introduce a new make variable: NMFLAGS.
As the name indicates, these are flags to pass to nm(1).  The newer
binutils have a plugin mechanism so, to build something with LLVM's
LTO, we need to pass flags to nm(1).  This commit also extends
lorder(1) to pass NMFLAGS to nm(1).
2015-08-14 22:54:52 +00:00
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
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
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
Ian Lepore
e8bac3f240 If a specific timecounter has been chosen via sysctl, and a new timecounter
with higher quality registers (presumably in a module that has just been
loaded), do not undo the user's choice by switching to the new timecounter.

Document that behavior, and also the fact that there is no way to unregister
a timecounter (and thus no way to unload a module containing one).
2015-08-12 20:50:20 +00:00
Christian Brueffer
548afe2bec Fix mandoc warnings/errors.
MFC after:	1 week
2015-08-12 11:56:19 +00:00
Mariusz Zaborski
89ca10c6e2 Make the nvlist_next(9) function handle NULL pointer variable.
This simplifies removing the first element from nvlist.

Reviewed by:	AllanJude
Approved by:	pjd (mentor)
2015-08-11 17:41:32 +00:00
Ian Lepore
196d3019a8 Allow the choice of PPS signal captured by uart(4) to be runtime-configured,
eliminating the need to build a custom kernel to use the CTS signal.

The historical UART_PPS_ON_CTS kernel option is still honored, but now it
can be overridden at runtime using a tunable to configure all uart devices
(hw.uart.pps_mode) or specific devices (dev.uart.#.pps_mode).  The per-
device config is both a tunable and a writable sysctl.

This syncs the PPS capabilities of uart(4) with the enhancements recently
recently added to ucom(4) for capturing from USB serial devices.

Relnotes:	yes
2015-08-10 20:08:09 +00:00
Christian Brueffer
db51871b42 Xref iwm(4). 2015-08-10 10:54:35 +00:00
Christian Brueffer
1db4188894 Hook up iwm.4 and iwmfw.4 to the build. 2015-08-10 10:36:08 +00:00
Alexander Motin
ff7b06db23 Document kern.cam.ctl.debug sysctl.
MFC after:	1 week
2015-08-09 10:11:04 +00:00
Alan Cox
a61bd9573f Revise the text about the atomicity of the defined operations across
multiple processors.  In particular, clearly state that the operations
are always atomic when they are applied to the default memory type
that is used by the kernel (and applications).

Reviewed by:	kib, jhb (an earlier version)
MFC after:	1 week
2015-08-09 07:45:15 +00:00
Marcelo Araujo
f6f5a3ea22 Add myself into the src graph.
Approved by:		bapt (mentor)
Differential Revision:	D3294
2015-08-09 02:10:20 +00:00
Marcelo Araujo
9b133ca7d9 Add rodrigc@ to the committers graph.
Approved by:		bapt (mentor)
Differential Revision:	D3288
2015-08-09 02:08:28 +00:00
Pawel Jakub Dawidek
445bda3f4f Allow to disable BIO_DELETE passthru in fstab for swap-on-geli devices by
passing 'notrim' option.

PR:		198863
Submitted by:	Matthew D. Fuller fullermd at over-yonder dot net
2015-08-08 09:57:38 +00:00
Rui Paulo
d4886179cb Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.
There are still several bugs, but I've been using it for a while now.
Thanks to all the testers and to Adrian for his help with this
driver.

This driver isn't connected to the build yet, but it will be soon.

There's no MFC planned because the driver isn't very stable yet.

Reviewed by:	adrian
Obtained from:	https://github.com/rpaulo/iwm
Tested by:	adrian, gjb, dumbbell (others that I forgot).
Relnotes:	yes
2015-08-08 06:06:48 +00:00
Marcel Moolenaar
aaa8b90caf Document the application interface. 2015-08-08 04:59:27 +00:00
Jason A. Harmening
cbaa6a0e0c Create man page for pmap_quick_enter_page(9) and pmap_quick_remove_page(9)
Reviewed by:	kib, brueffer, wblock
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D3312
2015-08-07 12:13:15 +00:00
Kevin Lo
0fa4d4b570 Add support for ASUS WL-100g. 2015-08-07 02:05:16 +00:00
Ian Lepore
374b1ec1ea Document the recently added get-bitmode and eeprom read/write functionality. 2015-08-06 20:59:03 +00:00
Eric van Gyzen
ddab052725 Disable SSE in libthr
Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from:	dim, jmg, rpaulo
Approved by:	kib (mentor)
MFC after:	2 weeks
Sponsored by:	Dell Inc.
2015-08-05 12:53:55 +00:00
Kevin Lo
3072411ee8 Add support for Planex GW-NS300N. 2015-08-04 15:04:28 +00:00
Edward Tomasz Napierala
cdc3449233 Revert r286236; vgonel() is a static function.
Sponsored by:	The FreeBSD Foundation
2015-08-04 08:16:18 +00:00
Edward Tomasz Napierala
6a968be547 Document vgonel(9).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-08-03 16:30:47 +00:00
Ed Schouten
43a81e6322 Add a manual page for the cloudabi and cloudabi64 kernel modules.
CloudABI has two separate kernel modules: cloudabi and cloudabi64. The
first module contains all the pointer size independent code, whereas
cloudabi64 contains the actual 64-bits specific system calls and the ELF
loader.

Reviewed by:	wblock
Obtained from:	https://github.com/NuxiNL/freebsd
Differential Revision:	https://reviews.freebsd.org/D3258
2015-08-02 14:56:30 +00:00
Mark Johnston
16f3fdf55f Regenerate after r286174. 2015-08-02 00:56:16 +00:00
Mark Johnston
d912066c36 Add a src.conf option to build and install the DTrace test suite.
Reviewed by:	gnn, ngie
Differential Revision:	https://reviews.freebsd.org/D3195
2015-08-02 00:37:33 +00:00
John-Mark Gurney
94d919b999 mark this function as deprecated, and put the warning first, since I
doubt most people will read to the end...  Note the use of sys/cdefs.h
for pre-C11 compilers...

I didn't included a note about being compatibile w/ userland since a
C11 feature should be obviously usable in userland...

Suggested by:	imp
2015-08-02 00:22:14 +00:00
Jason Unovitch
994cfa1f63 - Add myself to the committers-ports.dot and add my mentor relationship.
- Add myself to the calendar.freebsd.

Approved by:	delphij (mentor)
Differential Revision:	https://reviews.FreeBSD.org/D3265
2015-08-01 17:29:52 +00:00
John-Mark Gurney
215397449a The implementation note isn't true anymore..
Not that anyone reads it, but those that do, remind them that this
isn't usable in userland...  I can't wait till this doc is wrong..
2015-07-31 03:28:02 +00:00
Christian Brueffer
703a08b23c The kernel option and module are actually called pmspcv.
MFC after:	3 days
2015-07-30 19:08:23 +00:00
Allan Jude
91ed97ddd8 Updat the committers graph
Approved by:	marcel (mentor)
Differential Revision:	https://reviews.freebsd.org/D3251
2015-07-30 17:02:23 +00:00
Ed Maste
6974dd6f4b Use default CLANG build options for ARM
We previously disabled CLANG_FULL on (little-endian) ARM because the
build failed.  This is no longer the case and as of Clang 3.5 we cannot
build any part of the in-tree Clang with in-tree GCC, so it's no longer
necessary to disable CLANG_FULL.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2525
2015-07-29 19:06:53 +00:00
Ed Maste
5be09b1082 Regenerate src.conf(5) after r286016 and r286030 2015-07-29 18:55:51 +00:00
Ed Maste
5ea9e83e2f Allow ELF Tool Chain elfcopy to be installed as objcopy
ELF Tool Chain elfcopy is nearly a drop-in replacement for GNU objcopy,
but does not currently support PE output which is needed for building
x86 UEFI bits.

Add a src.conf knob to allow installing it as objcopy and set it by
default for aarch64 only, where we don't have a native binutils.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2887
2015-07-29 18:45:38 +00:00
Christian Brueffer
8843746ab4 Remove the AUTHORS section until it's clear who exactly wrote the driver. 2015-07-29 16:37:36 +00:00
Warner Losh
aa255ef6dd Teach sysctl about the new optional suffix after IK to specify
precision. Update input as well. Add IK to the manual (it was missing
completely).

Differential Revision: https://reviews.freebsd.org/D3181
2015-07-29 02:34:25 +00:00
Michael Gmelin
ca2e4ecd73 isl(4), driver for Intersil I2C ISL29018 Digital Ambient Light Sensor
Differential Revision:	https://reviews.freebsd.org/D2811
Reviewed by:	adrian, wblock
Approved by:	adrian, wblock
Relnotes:	yes
2015-07-25 20:17:19 +00:00
Michael Gmelin
46f07718f7 cyapa(4), driver for the Cypress APA I2C trackpad
Differential Revision:	https://reviews.freebsd.org/D3068
Reviewed by:	kib, wblock
Approved by:	kib
Relnotes:	yes
2015-07-25 18:14:35 +00:00
Edward Tomasz Napierala
208a8b9532 Update Capsicum and Mandatory Access Control manual pages
to no longer claim they are experimental.

Reviewed by:	rwatson@, wblock@
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2985
2015-07-25 15:56:49 +00:00
Kristof Provost
e600320b2a Pf can reassemble IPv6 fragments now.
Obtained from: bluhm (OpenBSD)
Sponsored by: Essen FreeBSD Hackathon
2015-07-25 14:06:32 +00:00
Christian Brueffer
79cdd7a420 Add a basic manpage for the pms driver.
MFC after:	1 week
Committed from:	Essen FreeBSD Hackathon
2015-07-24 21:48:53 +00:00
Brooks Davis
bdf80fecf0 Document the fact that tunables can be set in device.hints.
Reviewed by:	wblock
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3153
2015-07-23 17:27:10 +00:00
Marcel Moolenaar
be00e09818 Check the hw.proto.attach environment variable for devices that
proto(4) should attach to instead of the normal driver.

Document the variable.
2015-07-19 23:37:45 +00:00
Edward Tomasz Napierala
bd425507b7 Expand sysctl descriptions in iscsi(4) and ctl(4).
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-18 15:27:12 +00:00
Ed Schouten
50f960e60e Fix a small typo: "the the".
Spotted by:	wblock
2015-07-16 15:43:55 +00:00
Ed Schouten
707d98fe2f Implement the CloudABI random_get() system call.
The random_get() system call works similar to getentropy()/getrandom()
on OpenBSD/Linux. It fills a buffer with random data.

This change introduces a new function, read_random_uio(), that is used
to implement read() on the random devices. We can call into this
function from within the CloudABI compatibility layer.

Approved by:	secteam
Reviewed by:	jmg, markm, wblock
Obtained from:	https://github.com/NuxiNL/freebsd
Differential Revision:	https://reviews.freebsd.org/D3053
2015-07-14 18:45:15 +00:00
Christian Brueffer
9870187435 Markup fixes. 2015-07-13 15:26:03 +00:00
Christian Brueffer
647cdd025a Fix a typo and duplicate word. 2015-07-13 14:25:15 +00:00
Mark Murray
3aa77530ca * Address review (and add a bit myself).
- Tweek man page.
 - Remove all mention of RANDOM_FORTUNA. If the system owner wants YARROW or DUMMY, they ask for it, otherwise they get FORTUNA.
 - Tidy up headers a bit.
 - Tidy up declarations a bit.
 - Make static in a couple of places where needed.
 - Move Yarrow/Fortuna SYSINIT/SYSUNINIT to randomdev.c, moving us towards a single file where the algorithm context is used.
 - Get rid of random_*_process_buffer() functions. They were only used in one place each, and are better subsumed into those places.
 - Remove *_post_read() functions as they are stubs everywhere.
 - Assert against buffer size illegalities.
 - Clean up some silly code in the randomdev_read() routine.
 - Make the harvesting more consistent.
 - Make some requested argument name changes.
 - Tidy up and clarify a few comments.
 - Make some requested comment changes.
 - Make some requested macro changes.

* NOTE: the thing calling itself a 'unit test' is not yet a proper
  unit test, but it helps me ensure things work. It may be a proper
  unit test at some time in the future, but for now please don't make
  any assumptions or hold any expectations.

Differential Revision:	https://reviews.freebsd.org/D2025
Approved by:	so (/dev/random blanket)
2015-07-12 18:14:38 +00:00
Adrian Chadd
6520495abc Add an initial NUMA affinity/policy configuration for threads and processes.
This is based on work done by jeff@ and jhb@, as well as the numa.diff
patch that has been circulating when someone asks for first-touch NUMA
on -10 or -11.

* Introduce a simple set of VM policy and iterator types.
* tie the policy types into the vm_phys path for now, mirroring how
  the initial first-touch allocation work was enabled.
* add syscalls to control changing thread and process defaults.
* add a global NUMA VM domain policy.
* implement a simple cascade policy order - if a thread policy exists, use it;
  if a process policy exists, use it; use the default policy.
* processes inherit policies from their parent processes, threads inherit
  policies from their parent threads.
* add a simple tool (numactl) to query and modify default thread/process
  policities.
* add documentation for the new syscalls, for numa and for numactl.
* re-enable first touch NUMA again by default, as now policies can be
  set in a variety of methods.

This is only relevant for very specific workloads.

This doesn't pretend to be a final NUMA solution.

The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by
'sysctl vm.default_policy=rr'.

This is only relevant if MAXMEMDOM is set to something other than 1.
Ie, if you're using GENERIC or a modified kernel with non-NUMA, then
this is a glorified no-op for you.

Thank you to Norse Corp for giving me access to rather large
(for FreeBSD!) NUMA machines in order to develop and verify this.

Thank you to Dell for providing me with dual socket sandybridge
and westmere v3 hardware to do NUMA development with.

Thank you to Scott Long at Netflix for providing me with access
to the two-socket, four-domain haswell v3 hardware.

Thank you to Peter Holm for running the stress testing suite
against the NUMA branch during various stages of development!

Tested:

* MIPS (regression testing; non-NUMA)
* i386 (regression testing; non-NUMA GENERIC)
* amd64 (regression testing; non-NUMA GENERIC)
* westmere, 2 socket (thankyou norse!)
* sandy bridge, 2 socket (thankyou dell!)
* ivy bridge, 2 socket (thankyou norse!)
* westmere-EX, 4 socket / 1TB RAM (thankyou norse!)
* haswell, 2 socket (thankyou norse!)
* haswell v3, 2 socket (thankyou dell)
* haswell v3, 2x18 core (thankyou scott long / netflix!)

* Peter Holm ran a stress test suite on this work and found one
  issue, but has not been able to verify it (it doesn't look NUMA
  related, and he only saw it once over many testing runs.)

* I've tested bhyve instances running in fixed NUMA domains and cpusets;
  all seems to work correctly.

Verified:

* intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different
  NUMA policies for processes under test.

Review:

This was reviewed through phabricator (https://reviews.freebsd.org/D2559)
as well as privately and via emails to freebsd-arch@.  The git history
with specific attributes is available at https://github.com/erikarn/freebsd/
in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy).

This has been reviewed by a number of people (stas, rpaulo, kib, ngie,
wblock) but not achieved a clear consensus.  My hope is that with further
exposure and testing more functionality can be implemented and evaluated.

Notes:

* The VM doesn't handle unbalanced domains very well, and if you have an overly
  unbalanced memory setup whilst under high memory pressure, VM page allocation
  may fail leading to a kernel panic.  This was a problem in the past, but it's
  much more easily triggered now with these tools.

* This work only controls the path through vm_phys; it doesn't yet strongly/predictably
  affect contigmalloc, KVA placement, UMA, etc.  So, driver placement of memory
  isn't really guaranteed in any way.  That's next on my plate.

Sponsored by:	Norse Corp, Inc.; Dell
2015-07-11 15:21:37 +00:00
John-Mark Gurney
f405d8eb61 some additional improvements to the documentation...
Sponsored by:	Netflix, Inc.
2015-07-11 04:20:56 +00:00
John-Mark Gurney
94b591186d yet more documentation improvements... Many changes were made to the
OCF w/o documentation...

Document the new (8+ year old) device_t way of handling things, that
_unregister_all will leave no threads in newsession, the _SYNC flag,
the requirement that a flag be specified...

Other minor changes like breaking up a wall of text into paragraphs...
2015-07-08 22:46:45 +00:00
Baptiste Daroussin
f9b9c07087 Fix typo which breaks build of manpages when WITHOUT_MANCOMPRESS is set
PR:		201153
Reported by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-07-08 22:24:55 +00:00
Patrick Kelsey
fe3ff217dd Replace use of .Po Pc with the preferred .Pq for single line
enclosures in iovctl.conf(5), iovctl(8), pci(9), and
pci_iov_schema(9).

Differential Revision: https://reviews.freebsd.org/D3000
Reviewed by: wblock
Approved by: jmallett (mentor)
2015-07-08 16:16:44 +00:00
Conrad Meyer
80f295a415 Add myself to committers-src.dot
Approved by:	markj (mentor)
2015-07-08 03:20:28 +00:00
Warner Losh
abb14e5ded The results of the vote are in. This reflects that vote. Single
line statements inside of braces is recognized as an acceptable
style.
	http://reviews.freebsd.org/V3
As always, this isn't license for wholesale change, etc.
2015-07-06 20:10:47 +00:00
Mark Johnston
363f89481b Remove a BUGS entry that was addressed by r282300. 2015-07-05 23:24:52 +00:00
Mark Johnston
4b4ad3a219 Rename the dtrace-* man pages to dtrace_* for consistency with other
subsection man pages (e.g. geom_*, mac_*, snd_*).
2015-07-05 23:23:12 +00:00
Konstantin Belousov
e6e979f5d0 Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-07-05 19:29:24 +00:00
Mariusz Zaborski
58c86148dd Move nvlist documentation to the FreeBSD Kernel Developer's sections.
Approved by:	pjd (mentor)
2015-07-04 10:27:30 +00:00
Julio Merino
30161d035c Add support for TEST_METADATA
Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

MFC after:	1 week
2015-07-04 02:37:36 +00:00
Julio Merino
18bafc4da9 Add missing shebang
Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after:	1 week
2015-07-04 02:24:47 +00:00
Edward Tomasz Napierala
a2c782d103 Make ctl(4) appear in "man -k iscsi" results.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-03 16:55:08 +00:00
Marcel Moolenaar
15abbe5137 Minor update to the proto(4) man page:
1.  We now support ISA devices
2.  DMA support has been added
2015-07-03 16:20:14 +00:00
John-Mark Gurney
e08d13cf83 more word smithing wrt the crd_inject field...
We've already defined IV earlier, so no need to expand it a second
time here...
2015-07-03 01:55:06 +00:00
John-Mark Gurney
2ca5eb5d2d update the documentation of the _IV_ flags... _IV_PRESENT doesn't
mean what you think it should...  This will be fixed in the future
with a flag rename, but document what the flag really does and make
the _IV_ flags clear what their presents (or lack there of) means...

Reviewed by:	gnn, eri (both earlier version)
2015-07-03 00:37:16 +00:00
Andrew Turner
5607ec2379 Set MACHINE_CPU to arm64 when building for arm64. This is needed by the
ports tree as they check this value in a number of ports.

PR:		201259
Sponsored by:	ABT Systems Ltd
2015-07-02 13:42:57 +00:00
John-Mark Gurney
0812640475 add units to the length and count so that it's clear what they
are measured in...  Gems like: "len is the length of the buffer."
aren't useful in man pages.
2015-06-30 19:06:14 +00:00
Hiren Panchasara
5341316696 Add missing DTrace scripts that exist in the source tree to the Makefile for
install.
While here, sort the list.

Differential Revision:	D2950
Submitted by:		Jason Wolfe <j at nitrology.com>
Reviewed by:		gnn, markj, hiren
Sponsored by:		Limelight Networks
2015-06-30 18:23:08 +00:00
Mark Murray
c4f9c760c9 Updated random(4) boot/shutdown scripting.
Fix the man pages as well.

Differential Revision: https://reviews.freebsd.org/D2924
Approved by: so (delphij)
2015-06-30 17:09:41 +00:00
Mark Murray
d1b06863fb Huge cleanup of random(4) code.
* GENERAL
- Update copyright.
- Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set
  neither to ON, which means we want Fortuna
- If there is no 'device random' in the kernel, there will be NO
  random(4) device in the kernel, and the KERN_ARND sysctl will
  return nothing. With RANDOM_DUMMY there will be a random(4) that
  always blocks.
- Repair kern.arandom (KERN_ARND sysctl). The old version went
  through arc4random(9) and was a bit weird.
- Adjust arc4random stirring a bit - the existing code looks a little
  suspect.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Redo read_random(9) so as to duplicate random(4)'s read internals.
  This makes it a first-class citizen rather than a hack.
- Move stuff out of locked regions when it does not need to be
  there.
- Trim RANDOM_DEBUG printfs. Some are excess to requirement, some
  behind boot verbose.
- Use SYSINIT to sequence the startup.
- Fix init/deinit sysctl stuff.
- Make relevant sysctls also tunables.
- Add different harvesting "styles" to allow for different requirements
  (direct, queue, fast).
- Add harvesting of FFS atime events. This needs to be checked for
  weighing down the FS code.
- Add harvesting of slab allocator events. This needs to be checked for
  weighing down the allocator code.
- Fix the random(9) manpage.
- Loadable modules are not present for now. These will be re-engineered
  when the dust settles.
- Use macros for locks.
- Fix comments.

* src/share/man/...
- Update the man pages.

* src/etc/...
- The startup/shutdown work is done in D2924.

* src/UPDATING
- Add UPDATING announcement.

* src/sys/dev/random/build.sh
- Add copyright.
- Add libz for unit tests.

* src/sys/dev/random/dummy.c
- Remove; no longer needed. Functionality incorporated into randomdev.*.

* live_entropy_sources.c live_entropy_sources.h
- Remove; content moved.
- move content to randomdev.[ch] and optimise.

* src/sys/dev/random/random_adaptors.c src/sys/dev/random/random_adaptors.h
- Remove; plugability is no longer used. Compile-time algorithm
  selection is the way to go.

* src/sys/dev/random/random_harvestq.c src/sys/dev/random/random_harvestq.h
- Add early (re)boot-time randomness caching.

* src/sys/dev/random/randomdev_soft.c src/sys/dev/random/randomdev_soft.h
- Remove; no longer needed.

* src/sys/dev/random/uint128.h
- Provide a fake uint128_t; if a real one ever arrived, we can use
  that instead. All that is needed here is N=0, N++, N==0, and some
  localised trickery is used to manufacture a 128-bit 0ULLL.

* src/sys/dev/random/unit_test.c src/sys/dev/random/unit_test.h
- Improve unit tests; previously the testing human needed clairvoyance;
  now the test will do a basic check of compressibility. Clairvoyant
  talent is still a good idea.
- This is still a long way off a proper unit test.

* src/sys/dev/random/fortuna.c src/sys/dev/random/fortuna.h
- Improve messy union to just uint128_t.
- Remove unneeded 'static struct fortuna_start_cache'.
- Tighten up up arithmetic.
- Provide a method to allow eternal junk to be introduced; harden
  it against blatant by compress/hashing.
- Assert that locks are held correctly.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Turn into self-sufficient module (no longer requires randomdev_soft.[ch])

* src/sys/dev/random/yarrow.c src/sys/dev/random/yarrow.h
- Improve messy union to just uint128_t.
- Remove unneeded 'staic struct start_cache'.
- Tighten up up arithmetic.
- Provide a method to allow eternal junk to be introduced; harden
  it against blatant by compress/hashing.
- Assert that locks are held correctly.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Turn into self-sufficient module (no longer requires randomdev_soft.[ch])
- Fix some magic numbers elsewhere used as FAST and SLOW.

Differential Revision: https://reviews.freebsd.org/D2025
Reviewed by: vsevolod,delphij,rwatson,trasz,jmg
Approved by: so (delphij)
2015-06-30 17:00:45 +00:00
Maxim Konovalov
2a52334e0b o DragonFly 4.2.0 added. 2015-06-30 07:46:06 +00:00
Sean Bruno
8971c13ffa Delete the refernce to VLAN handling being disabled by default. This is
no longer the case.

PR:		118693
MFC after:	3 days
2015-06-29 17:59:00 +00:00
Christian Brueffer
d14a50d95a Fix issues that kept some of the examples from actually working.
PR:		144534
Submitted by:	Nicolas Edel
MFC after:	1 week
2015-06-29 14:41:19 +00:00
Hans Petter Selasky
38b622e199 Make the system queue header file fully usable within C++ programs by
adding macros to define class lists.

This change is backwards compatible for all use within C and C++
programs. Only C++ programs will have added support to use the queue
macros within classes. Previously the queue macros could only be used
within structures.

The queue.3 manual page has been updated to describe the new
functionality and some alphabetic sorting has been done while
at it.

Differential Revision:	https://reviews.freebsd.org/D2745
PR:			200827 (exp-run)
MFC after:		2 weeks
2015-06-28 21:06:45 +00:00
Matthew Seaman
4311777e58 Steve KArgl's commit bit taken in at his own request
With hat:     core-secretary
Approved by:	core
2015-06-28 09:03:26 +00:00
Baptiste Daroussin
af38028d11 Make all shared library a relative symlink
This makes sysroot usable for cross building, it also removes the need for
_SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no time
to test it)

Differential Revision:	https://reviews.freebsd.org/D2920
Submitted by:	imp, adrian
Tested by:	adrian
2015-06-27 23:28:56 +00:00