freebsd-skq/sys
Adrian Chadd 1a85141ad4 Pull out the if_transmit() work and revert back to ath_start().
My changed had some rather significant behavioural changes to throughput.
The two issues I noticed:

* With if_start and the ifnet mbuf queue, any temporary latency
  would get eaten up by some mbufs being queued.  With ath_transmit()
  queuing things to ath_buf's, I'd only get 512 TX buffers before I
  couldn't queue any further frames.

* There's also some non-zero latency involved with TX being pushed
  into a taskqueue via direct dispatch.  Any time the scheduler didn't
  immediately schedule the ath TX task would cause extra latency.
  Various 1ge/10ge drivers implement both direct dispatch (if the TX
  lock can be acquired) and deferred task transmission (if the TX lock
  can't be acquired), with frames being pushed into a drbd queue.
  I'll have to do this at some point, but until I figure out how to
  deal with 802.11 fragments, I'll have to wait a while longer.

So what I saw:

* lots of extra latency, specially under load - if the taskqueue
  wasn't immediately scheduled, things went pear shaped;

* any extra latency would result in TX ath_buf's taking their sweet time
  being replenished, so any further calls to ath_transmit() would drop
  mbufs.

* .. yes, there's no explicit backpressure here - things are just dropped.
  Eek.

With this, the general performance has gone up, but those subtle if_start()
related race conditions are back.  For some reason, this is doubly-obvious
with the AR5416 NIC and I don't quite understand why yet.

There's an unrelated issue with AR5416 performance in STA mode (it's
fine in AP mode when bridging frames, weirdly..) that requires a little
further investigation.  Specifically - it works fine on a Lenovo T40
(single core CPU) running a March 2012 9-STABLE kernel, but a Lenovo T60
(dual core) running an early November 2012 kernel behaves very poorly.
The same hardware with an AR9160 or AR9280 behaves perfectly.
2013-02-13 05:32:19 +00:00
..
amd64 Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'. 2013-02-11 20:36:07 +00:00
arm Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
boot Add watchdog driver for Allwinner A10 2013-02-11 11:31:23 +00:00
bsm Style. 2013-02-11 23:14:54 +00:00
cam Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
cddl Merge zfs_ioctl.c code that should have been merged together with ZFS v28. 2013-02-11 21:10:55 +00:00
compat Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h 2013-01-29 18:41:30 +00:00
conf Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
contrib Merge two bug fixes from the vendor branch. 2013-01-28 20:37:32 +00:00
crypto Revert previous commit... 2012-10-10 08:36:38 +00:00
ddb Small textdump enhancements. 2012-11-01 04:07:08 +00:00
dev Pull out the if_transmit() work and revert back to ath_start(). 2013-02-13 05:32:19 +00:00
fs ext2fs: Use prototype declarations for function definitions 2013-02-10 19:49:37 +00:00
gdb
geom g_mirror: g_getattr() failure should not be fatal 2013-01-26 10:50:04 +00:00
gnu/fs r16312 is not any longer real since many years (likely since when VFS 2012-11-19 22:43:45 +00:00
i386 cpususpend_handler: mark AP as resumed only after fully setting up lapic 2013-02-02 12:04:32 +00:00
ia64 Eliminate the PC_CURTHREAD symbol and load the current thread's 2013-02-12 17:38:35 +00:00
isa
kern Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
kgssapi Piete.Brooks at cl.cam.ac.uk reported via email a crash which was 2012-12-18 00:25:48 +00:00
libkern Add __aeabi_ulcmp to allow building of the LINT kernel. 2013-01-23 09:18:18 +00:00
mips Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
modules Fix LINT build for ARM. 2013-02-09 06:31:22 +00:00
net Resolve source address selection in presense of CARP. Add a couple 2013-02-11 10:58:22 +00:00
net80211 Substitute '#ifdef ALIGNED_POINTER' with '#ifndef __NO_STRICT_ALIGNMENT', 2013-02-12 11:24:37 +00:00
netatalk Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netgraph ng_ether_ifnet_arrival_event: check interface type before using IFP2NG 2013-02-04 17:29:13 +00:00
netinet Send the adaptation layer indication only if set by the user. 2013-02-11 21:02:49 +00:00
netinet6 Generate lle_event in the IPv6 neighbor discovery code too. 2013-01-26 00:05:22 +00:00
netipsec Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netipx Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netncp Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netpfil In netpfil/pf: 2012-12-28 09:19:49 +00:00
netsmb Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nfs Remove the unused nfs_curusec(). 2013-01-17 19:03:24 +00:00
nfsclient Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
nfsserver Use vfs_timestamp() to set file timestamps rather than invoking 2013-01-18 18:43:38 +00:00
nlm Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ofed Fix LINT build on amd64. 2013-02-09 04:13:45 +00:00
opencrypto Revert previous commit... 2012-10-10 08:36:38 +00:00
pc98 Remove support for plip from the GENERIC kernel as no systems in the 2013-02-01 20:17:11 +00:00
pci Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the 2013-01-28 19:38:13 +00:00
powerpc Introduce PLATFORMMETHOD_END and use it. 2013-02-13 02:21:45 +00:00
rpc Add support for backchannels to the kernel RPC. Backchannels 2012-12-08 00:29:16 +00:00
security Style. 2013-02-11 22:54:23 +00:00
sparc64 Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
sys Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
teken
tools Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
ufs Fix several unsafe pointer dereferences in the buffered_write() 2013-02-10 10:17:33 +00:00
vm Try to improve r242655 take III: move these SYSCTLs describing the kernel 2013-02-04 09:35:48 +00:00
x86 Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
xdr
xen Move the corresponding MTX_SYSINIT() next to their struct mtx declaration 2012-10-26 17:31:35 +00:00
Makefile Run cscope with the -v parameter to make it more user-friendly. 2012-12-02 20:51:24 +00:00