In GEOM DISK:
 - Replace single done mutex with per-disk ones.  On system with several
disks on several HBAs that removes small, but measurable lock congestion.
 - Modify disk destruction process to not destroy the mutex prematurely.
 - Remove some extra pointer derefences.


git-svn-id: svn://svn.freebsd.org/base/head@248694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove two bzero()s that are erasing only few more bytes then set later.


git-svn-id: svn://svn.freebsd.org/base/head@248695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make GEOM MULTIPATH to report unmapped bio support if underling path report
it.  GEOM MULTIPATH itself never touches the data and so transparent.


git-svn-id: svn://svn.freebsd.org/base/head@248696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When we are removing a specific set, call ipfw_expire_dyn_rules only once.

Obtained from:	Yandex LLC
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@248697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Depending on combination of running commands (NCQ/non-NCQ) try to avoid
extra read from PxCI/PxSACT registers.  If only NCQ commands are running, we
don't really need PxCI.  If only non-NCQ commands are running we don't need
PxSACT.  Mixed set may happen only on controllers with FIS-based switching
when port multiplier is attached, and then we have to read both registers.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@248698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Cache the callout precision argument as part of the informations required
for migrating callouts to new CPU. This value is passed to
callout_cc_add() in order to update properly precision field in case of
rescheduling/migration.

Reviewed by:	mav


git-svn-id: svn://svn.freebsd.org/base/head@248699 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
o Typo: IEE -> IEEE.

PR:		docs/173069
Submitted by:	Bjorn Heidotting
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@248700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Read Asynchronous Notification statuses only if Port Multiplier or ATAPI
device are connected. ATA disks are not using ANs, while the extra register
read operation is quite expensive.


git-svn-id: svn://svn.freebsd.org/base/head@248704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Unlock IPMI sc while performing requests via KCS and SMIC interfaces.
It is already done in SSIF interface code.
This reduces contention/spinning reported by many users.

PR:		kern/172166
Submitted by:	Eric van Gyzen <eric at vangyzen.net>
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@248705 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Dtrace: add toupper()/tolower() and enhancements to lltostr().

Merge changes from illumos:

1451 DTrace needs toupper()/tolower() subroutines
1457 lltostr() D subroutine should take an optional base

This change bumps the DT_VERS_* number to 1.8.1 in
accordance to what is done in illumos.

The test suite we currently include is outdated and
doesnt support some updates in tst.subr.d which had to
be left out for now.

Illumos Revisions:	r13458 5e394d8db762
			r13459 c3454574dd1a

Reference:
https://www.illumos.org/issues/1451
https://www.illumos.org/issues/1457

Tested by:	Fabian Keil
Obtained from:	Illumos
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@248706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs
size and usage in hrStorageAllocationUnits. If the file system has
more than 2^31 allocations it can not be shown correctly and the
meters are useless.

In such cases follow net-snmp behaviour and increase
hrStorageAllocationUnits so the values fit under INT_MAX.

PR:		bin/177183
Submitted by:	Eugene Grosbein egrosbein rdtc.ru
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@248707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Dtrace: Add SUN MDB-like type-aware print() action.

Merge change from illumos:

1694 Add type-aware print() action

This is a very nice feature implemented in upstream Dtrace.
A complete description is available here:
http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/

This change bumps the DT_VERS_* number to 1.9.0 in
accordance to what is done in illumos.

While here also include some minor cleanups to ease further merging
and appease clang with a fix by Fabian Keil.

Illumos Revisions:	13501:c3a7090dbc16
			13483:f413e6c5d297

Reference:
https://www.illumos.org/issues/1560
https://www.illumos.org/issues/1694

Tested by:	Fabian Keil
Obtained from:	Illumos
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@248708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not pass unmapped buffers to drivers that cannot handle them

In physio, check if device can handle unmapped IO and pass an
appropriately mapped buffer to the driver strategy routine. The
only driver in the tree that can handle unmapped buffers is one
exposed by GEOM, so mark it as such with the new flag in the
driver cdevsw structure.

This fixes insta-panics on hosts, running dconschat, as /dev/fwmem
is an example of the driver that makes use of physio routine, but
bypasses the g_down thread, where the buffer gets mapped normally.

Discussed with: kib (earlier version)


git-svn-id: svn://svn.freebsd.org/base/head@248712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'