Remove obsolete objformat information.

Submitted by:	db


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add new USB ID.

PR:		usb/177105
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix remainder calculation when biosize is not a power of 2

In common configurations biosize is a power of two, but is not required to
be so.  Thanks to markj@ for spotting an additional case beyond my original
patch.

Reviewed by: rmacklem@


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Assert that a ccb passed to cam_periph_mapmem() for XPT_SCSI_IO and
XPT_ATA_IO holds virtual buffer address.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Cast "start" to u_long. Temporary fix to unbreak tinderbox.
We need here max possible storage or dynamic, depend on size of address cell.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a convenience macro bread_gb() to wrap a call to
breadn_flags(). Comparing with bread(), it adds an argument to pass
the flags to getblk().

Sponsored by:	The FreeBSD Foundation
Tested by:	pho
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
iwn(4) doesn't support adhoc mode.

PR:		misc/177106
Submitted by:	Hiren Panchasara <hiren.panchasara gmail.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Implement the concept of the unmapped VMIO buffers, i.e. buffers which
do not map the b_pages pages into buffer_map KVA.  The use of the
unmapped buffers eliminate the need to perform TLB shootdown for
mapping on the buffer creation and reuse, greatly reducing the amount
of IPIs for shootdown on big-SMP machines and eliminating up to 25-30%
of the system time on i/o intensive workloads.

The unmapped buffer should be explicitely requested by the GB_UNMAPPED
flag by the consumer.  For unmapped buffer, no KVA reservation is
performed at all. The consumer might request unmapped buffer which
does have a KVA reserve, to manually map it without recursing into
buffer cache and blocking, with the GB_KVAALLOC flag.

When the mapped buffer is requested and unmapped buffer already
exists, the cache performs an upgrade, possibly reusing the KVA
reservation.

Unmapped buffer is translated into unmapped bio in g_vfs_strategy().
Unmapped bio carry a pointer to the vm_page_t array, offset and length
instead of the data pointer.  The provider which processes the bio
should explicitely specify a readiness to accept unmapped bio,
otherwise g_down geom thread performs the transient upgrade of the bio
request by mapping the pages into the new bio_transient_map KVA
submap.

The bio_transient_map submap claims up to 10% of the buffer map, and
the total buffer_map + bio_transient_map KVA usage stays the
same. Still, it could be manually tuned by kern.bio_transient_maxcnt
tunable, in the units of the transient mappings.  Eventually, the
bio_transient_map could be removed after all geom classes and drivers
can accept unmapped i/o requests.

Unmapped support can be turned off by the vfs.unmapped_buf_allowed
tunable, disabling which makes the buffer (or cluster) creation
requests to ignore GB_UNMAPPED and GB_KVAALLOC flags.  Unmapped
buffers are only enabled by default on the architectures where
pmap_copy_page() was implemented and tested.

In the rework, filesystem metadata is not the subject to maxbufspace
limit anymore. Since the metadata buffers are always mapped, the
buffers still have to fit into the buffer map, which provides a
reasonable (but practically unreachable) upper bound on it. The
non-metadata buffer allocations, both mapped and unmapped, is
accounted against maxbufspace, as before. Effectively, this means that
the maxbufspace is forced on mapped and unmapped buffers separately.
The pre-patch bufspace limiting code did not worked, because
buffer_map fragmentation does not allow the limit to be reached.

By Jeff Roberson request, the getnewbuf() function was split into
smaller single-purpose functions.

Sponsored by:	The FreeBSD Foundation
Discussed with:	jeff (previous version)
Tested by:	pho, scottl (previous version), jhb, bf
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248508 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Return "start" and "end" to u_long world. Because rman handle addresses as
u_long too.

Discussed with:	ian@
Pointy hat to:	ray@


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a helper function vfs_bio_bzero_buf() to zero the portion of the
buffer, transparently handling mapped or unmapped buffers.  Its intent
is to replace the use of bzero(bp->b_data) in cases where the buffer
might be unmapped, to avoid unneeded upgrades.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
A flag for the filesystem to indicate to the upper levels that it accepts
unmapped buffers for the VOP_STRATEGY().

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pass unmapped buffers for page in requests if the filesystem indicated support
for the unmapped i/o.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not map the swap i/o pbufs if the geom provider for the swap
partition accepts unmapped requests.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not remap usermode pages into KVA for physio.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
A flag for the geom disk driver to indicate that it accepts the
unmapped i/o requests.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The geom_part provider supports unmapped bio iff the underlying
provider does so, since geom_part never inspects the bio_data.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Support unmapped i/o for the md(4).

The vnode-backed md(4) has to map the unmapped bio because VOP_READ()
and VOP_WRITE() interfaces do not allow to pass unmapped requests to
the filesystem. Vnode-backed md(4) uses pbufs instead of relying on
the bio_transient_map, to avoid usual md deadlock.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho, scottl


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Support unmapped i/o for the md(4).

The vnode-backed md(4) has to map the unmapped bio because VOP_READ()
and VOP_WRITE() interfaces do not allow to pass unmapped requests to
the filesystem. Vnode-backed md(4) uses pbufs instead of relying on
the bio_transient_map, to avoid usual md deadlock.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho, scottl


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Commit the removal of a whitespace to record the proper commit message
for the r248519:

For the cam-attached HBAs, allow the driver to specify that it accepts
the unmapped bio by the PIM_UNMAPPED flag.  The CAM passes the
CAM_DATA_BIO data transfer type request for the unmapped bio, and the
driver could use the bus_dmamap_load_ccb() as a helper to
transparently handle the ccb.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	scottl
Tested by:	pho, scottl


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
UFS support of the unmapped i/o for the user data buffers.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho, scottl, jhb, bf


git-svn-id: svn+ssh://svn.freebsd.org/base/head@248521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f