Date: Thu, 28 Feb 2013 15:35:32 -0800 From: Adrian Chadd <adrian@freebsd.org> To: PseudoCylon <moonlightakkiy@yahoo.ca> Cc: freebsd-wireless@freebsd.org Subject: Re: [RFT] net80211 TX serialisation, take #4 Message-ID: <CAJ-Vmon=RTf%2BCZGq49NXZ%2Bz_MnEWfy%2BKMCwJ0sqr6Mr5GG%2BbpQ@mail.gmail.com> In-Reply-To: <CAFZ_MY%2B=O=-FtnYFqCfETmRk4UVvT-e0WChfNK9SnGtMbRu%2BWQ@mail.gmail.com> References: <CAFZ_MYJ13f6cvL4rP2XrO2rP=odHJigis8EBcAF4r65-ATOxGw@mail.gmail.com> <CAJ-Vmon5p=3gbdnQ1dtCXNGO-=k-_-ZyTS6wuBAMArC-jmdfXw@mail.gmail.com> <CAFZ_MYK-RiCMZ6XUgkhyAWmyXAPDQXnX14YnmWEqDqhjrzpVjA@mail.gmail.com> <CAJ-VmonwpUWdQdJARS-D5UfEr=F7CFLSyWeRsh-iXSa26m7uYQ@mail.gmail.com> <CAFZ_MY%2B=O=-FtnYFqCfETmRk4UVvT-e0WChfNK9SnGtMbRu%2BWQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Right - but then I still need to hold long held locks here across the net80211 _and_ the driver. Ie: * net80211 needs to hold a lock for the entire process of dequeuing a frame and running it to completion. It can't do this: * grab lock * dequeue frame * release lock --> here things race * grab net80211 lock * run with frame * release net80211 lock So you have to hold _some_ lock for the entire length of time you're processing that frame: * grab queue lock * dequeue frame * grab net80211 lock * process frame * release net80211 lock * release queue lock Same deal goes with the driver. That's the unfortunate side effect of having multiple stack and driver transmit paths all wanting to service the same queue. So either you have these long held locks but you can do fully inline, direct-dispatch transmit; or you use taskqueues and just serialise everything through the taskqueue. Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmon=RTf%2BCZGq49NXZ%2Bz_MnEWfy%2BKMCwJ0sqr6Mr5GG%2BbpQ>