freebsd-dev/sys
Adrian Chadd 470a7f4191 Migrate the TX path to a taskqueue for now, until a better way of
implementing parallel TX and TX/RX completion can be done without
simply abusing long-held locks.

Right now, multiple concurrent ath_start() entries can result in
frames being dequeued out of order.  Well, they're dequeued in order
fine, but if there's any preemption or race between CPUs between:

* removing the frame from the ifnet, and
* calling and runningath_tx_start(), until the frame is placed on a
  software or hardware TXQ

Then although dequeueing the frame is in-order, queueing it to the hardware
may be out of order.

This is solved in a lot of other drivers by just holding a TX lock over
a rather long period of time.  This lets them continue to direct dispatch
without races between dequeue and hardware queue.

Note to observers: if_transmit() doesn't necessarily solve this.
It removes the ifnet from the main path, but the same issue exists if
there's some intermediary queue (eg a bufring, which as an aside also
may pull in ifnet when you're using ALTQ.)

So, until I can sit down and code up a much better way of doing parallel
TX, I'm going to leave the TX path using a deferred taskqueue task.
What I will likely head towards is doing a direct dispatch to hardware
or software via if_transmit(), but it'll require some driver changes to
allow queues to be made without using the really large ath_buf / ath_desc
entries.

TODO:

* Look at how feasible it'll be to just do direct dispatch to
  ath_tx_start() from if_transmit(), avoiding doing _any_ intermediary
  serialisation into a global queue.  This may break ALTQ for example,
  so I have to be delicate.

* It's quite likely that I should break up ath_tx_start() so it
  deposits frames onto the software queues first, and then only fill
  in the 802.11 fields when it's being queued to the hardware.
  That will make the if_transmit() -> software queue path very
  quick and lightweight.

* This has some very bad behaviour when using ACPI and Cx states.
  I'll do some subsequent analysis using KTR and schedgraph and file
  a follow-up PR or two.

PR:		kern/168649
2012-06-04 22:01:12 +00:00
..
amd64 Various small changes to PV entry management: 2012-06-04 03:51:08 +00:00
arm Eliminate the now-unused AT91C_MASTER_CLOCK option and change the one 2012-06-04 04:24:59 +00:00
boot The loaddev environment variable is not modifiable once set, so it is not 2012-06-04 20:56:40 +00:00
bsm
cam Remove some dead code that I doubt will ever be implemented. 2012-06-04 09:47:19 +00:00
cddl Integrate a fix for a very odd signal delivery problem found 2012-06-04 16:15:40 +00:00
compat Make sure that each va_start has one and only one matching va_end, 2012-05-29 01:48:06 +00:00
conf Eliminate the now-unused AT91C_MASTER_CLOCK option and change the one 2012-06-04 04:24:59 +00:00
contrib Correct table counter functionality to not panic. 2012-05-31 20:10:05 +00:00
crypto Add support for the extended FPU states on amd64, both for native 2012-01-21 17:45:27 +00:00
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev Migrate the TX path to a taskqueue for now, until a better way of 2012-06-04 22:01:12 +00:00
fs Capitalize start of sentence. 2012-05-30 14:00:23 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
gnu/fs Fix build: 2012-05-23 06:49:50 +00:00
i386 Various small changes to PV entry management: 2012-06-04 03:51:08 +00:00
ia64 Improve style(9) in the previous commit. 2012-06-01 17:07:52 +00:00
isa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
kern Microoptimisation of code from r236560, also coming from Nginx Inc. 2012-06-04 14:18:13 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Use strcmp that I replaced by accident. 2012-05-21 02:45:47 +00:00
mips MFp4 bz_ipv6_fast: 2012-05-24 22:00:48 +00:00
modules Restore changes accidentally removed in r235537. 2012-06-04 08:40:14 +00:00
net Fix panic introduced by r235745. Panic occurs after first packet traverse renamed interface. 2012-06-04 12:36:58 +00:00
net80211 Fix some corner cases in the ieee80211_send_bar() handling. 2012-05-22 19:37:12 +00:00
netatalk Fix typos 2012-02-28 15:07:05 +00:00
netgraph Revert my local not yet properly tested changes, that leaked in 2012-05-25 07:46:24 +00:00
netinet Plug more refcount leaks and possible NULL deref for interface 2012-06-04 18:43:51 +00:00
netinet6 Plug reference leak. 2012-06-03 07:36:59 +00:00
netipsec Add multi-FIB IPv6 support to the core network stack supplementing 2012-02-03 13:08:44 +00:00
netipx Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Add multi-FIB IPv6 support to the core network stack supplementing 2012-02-03 13:08:44 +00:00
nfsclient PR# 165923 reported intermittent write failures for dirty 2012-05-12 12:02:51 +00:00
nfsserver Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0, 2011-12-15 02:26:53 +00:00
nlm jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011 2012-01-31 02:11:05 +00:00
ofed Revert r234834 per luigi@ request. 2012-05-03 08:56:43 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 MFprojects/zfsd: 2012-05-24 11:20:51 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc Panic openly if we cannot retrieve memory information from the device tree. 2012-05-30 18:05:48 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Replace all uses of the vm page queues lock by a r/w lock that is private 2012-05-29 01:52:38 +00:00
sys Fix typo [1]. Use commas to separate flag printouts, in style with 2012-06-02 19:39:12 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR. 2012-02-21 19:35:59 +00:00
ufs Enable vn_io_fault() lock avoidance for UFS. 2012-05-30 16:45:41 +00:00
vm Revert r236380 2012-06-01 18:58:50 +00:00
x86 free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG 2012-06-03 08:01:12 +00:00
xdr
xen blkif interface comment cleanups. No functional changes 2012-02-29 17:47:01 +00:00
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00