Implement "holding buffers" per TX queue rather than globally.

When working on TDMA, Sam Leffler found that the MAC DMA hardware
would re-read the last TX descriptor when getting ready to transmit
the next one.  Thus the whole ATH_BUF_BUSY came into existance -
the descriptor must be left alone (very specifically the link pointer
must be maintained) until the hardware has moved onto the next frame.

He saw this in TDMA because the MAC would be frequently stopping during
active transmit (ie, when it wasn't its turn to transmit.)

Fast-forward to today.  It turns out that this is a problem not with
a single MAC DMA instance, but with each QCU (from 0->9).  They each
maintain separate descriptor pointers and will re-read the last
descriptor when starting to transmit the next.

So when your AP is busy transmitting from multiple TX queues, you'll
(more) frequently see one QCU stopped, waiting for a higher-priority QCU
to finsh transmitting, before it'll go ahead and continue.  If you mess
up the descriptor (ie by freeing it) then you're short of luck.

Thanks to rpaulo for sticking with me whilst I diagnosed this issue
that he was quite reliably triggering in his environment.

This is a reimplementation; it doesn't have anything in common with
the ath9k or the Qualcomm Atheros reference driver.

Now - it in theory doesn't apply on the EDMA chips, as long as you
push one complete frame into the FIFO at a time.  But the MAC can DMA
from a list of frames pushed into the hardware queue (ie, you concat
'n' frames together with link pointers, and then push the head pointer
into the TXQ FIFO.)  Since that's likely how I'm going to implement
CABQ handling in hostap mode, it's likely that I will end up teaching
the EDMA TX completion code about busy buffers, just to be "sure"
this doesn't creep up.

Tested - iperf ap->sta and sta->ap (with both sides running this code):

* AR5416 STA
* AR9160/AR9220 hostap

To validate that it doesn't break the EDMA (FIFO) chips:

* AR9380, AR9485, AR9462 STA

Using iperf with the -S <tos byte decimal value> to set the TCP client
side DSCP bits, mapping to different TIDs and thus different TX queues.

TODO:

* Make this work on the EDMA chips, if we end up pushing lists of frames
  to the hardware (eg how we eventually will handle cabq in hostap/ibss
  mode.)


git-svn-id: svn://svn.freebsd.org/base/head@248264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update zfs.8 manpage date (missing in r247585)

MFC:	together with r247585


git-svn-id: svn://svn.freebsd.org/base/head@248265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r248266:
Import minor ZFS changes from vendor

Illumos ZFS issues:
  3604 zdb should print bpobjs more verbosely (fix zdb hang)
  3606 zpool status -x shouldn't warn about old on-disk format

MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@248267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add GEOM_* kernel options to the SYNOPSIS.


git-svn-id: svn://svn.freebsd.org/base/head@248273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor mdoc fixes.


git-svn-id: svn://svn.freebsd.org/base/head@248274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix minor spelling error in a comment.


git-svn-id: svn://svn.freebsd.org/base/head@248275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rewrite the vfs_bio_clrbuf(9) to not access the b_data for B_VMIO
buffers directly, use pmap_zero_page_area(9) for each zeroing page
region instead.

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


git-svn-id: svn://svn.freebsd.org/base/head@248276 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove excessive and inconsistent initializers for the various kernel
maps and submaps.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@248277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sort sections.


git-svn-id: svn://svn.freebsd.org/base/head@248278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correct type for DIOCGSTRIPESIZE.  Without this there
would be a stack overflow which will crash the program
later.

PR:		bin/176953
Submitted by:	r4721 tormail org
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@248279 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add pmap function pmap_copy_pages(), which copies the content of the
pages around, taking array of vm_page_t both for source and
destination.  Starting offsets and total transfer size are specified.

The function implements optimal algorithm for copying using the
platform-specific optimizations.  For instance, on the architectures
were the direct map is available, no transient mappings are created,
for i386 the per-cpu ephemeral page frame is used.  The code was
typically borrowed from the pmap_copy_page() for the same
architecture.

Only i386/amd64, powerpc aim and arm/arm-v6 implementations were
tested at the time of commit. High-level code, not committed yet to
the tree, ensures that the use of the function is only allowed after
explicit enablement.

For sparc64, the existing code has known issues and a stab is added
instead, to allow the kernel linking.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho (i386, amd64), scottl (amd64), ian (arm and arm-v6)
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@248280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When pidptr was passed as NULL to pidfile_open(3), we were returning
EAGAIN/EWOULDBLOCK when another daemon was running and had the pidfile open.
We should return EEXIST in that case, fix it.

Reported by:	Dirk Engling <erdgeist@erdgeist.org>
Reviewed by:	jhb, Dirk Engling <erdgeist@erdgeist.org>
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@248281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add currently unused flag argument to the cluster_read(),
cluster_write() and cluster_wbuild() functions.  The flags to be
allowed are a subset of the GB_* flags for getblk().

Sponsored by:	The FreeBSD Foundation
Tested by:	pho


git-svn-id: svn://svn.freebsd.org/base/head@248282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Some style fixes.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@248283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add FreeBSD 9.1.


git-svn-id: svn://svn.freebsd.org/base/head@248285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Removed redundant includes.


git-svn-id: svn://svn.freebsd.org/base/head@248286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
FDT_DTS_FILE is expanded in a Makefile so use :R to remove the suffix
rather than using echo|cut to remove everything after the first '.'.


git-svn-id: svn://svn.freebsd.org/base/head@248290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rename 'status' command to 'list' and introduce new 'status' which produces
more terse output more observable for both scripts and humans.

Also, it shifts hastctl closer to GEOM utilities with their list/status command
pairs.

Approved by:	pjd
MFC after:	4 weeks


git-svn-id: svn://svn.freebsd.org/base/head@248291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Delete requests can be larger than MAXPHYS.


git-svn-id: svn://svn.freebsd.org/base/head@248294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
We don't need buffer to handle BIO_DELETE, so don't check buffer size for it.
This fixes handling BIO_DELETE larger than MAXPHYS.


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