linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Emmanuel Grumbach <egrumbach@gmail.com>
Cc: Norbert Preining <preining@logic.at>,
	"Guy, Wey-Yi" <wey-yi.w.guy@intel.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dave Jones <davej@redhat.com>,
	David Rientjes <rientjes@google.com>
Subject: Re: iwlagn is getting very shaky
Date: Thu, 15 Dec 2011 15:07:33 +0100	[thread overview]
Message-ID: <1323958053.3337.48.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CANUX_P0sCPAWTsSVXpL3w5witnVi6wrtzTgJ0y6HjC-TYC9swg@mail.gmail.com> (sfid-20111211_205719_337550_081FCE1C)

So I finally looked at this ...

On Sun, 2011-12-11 at 21:56 +0200, Emmanuel Grumbach wrote:
> >> Could something be hogging the workqueues?

> > So I tried to understand what is going on with the workqueue and ended
> > up to see that if we are lucky, we can need the workqueue for the BA
> > handshake (could be AddBA / DelBA handling, or driver callback) while
> > we are scanning. Which basically means that we will need to wait until
> > the scan is over to handle these frames / callbacks. I got these
> > measurements while stopping the BA session:
> >
> > * scanning working for roughly 3 seconds (pardon me not being precise,
> > but with this order of magnitude I don't care much about the single
> > millisecond..)

Oh. I see, while scanning we won't process the work queue.

> > * when scanning is over, the while loop in ieee80211_iface_work
> > consumes 73 mgmt for about 34ms.
> > ( how come we have so many beacons during those 3 seconds..., or maybe
> > all the BCAST probe request ?, my network is quite busy...)
> > * then the finally my stop_tx_ba_cb was served which took 10ms (time
> > takes by the driver).
> > * another series of beacons (10ms).
> 
> What about flushing the workqueue before we scan ?
> This is not a bullet proof solution of course, we will still encounter
> bad races, but at least  we would flush what we can before the
> workqueue becomes unable for 4 seconds (!).

Yeah, that seems like a good thing. Actually I had an idea about this
before -- drain & stop the workqueue for any functions in mac80211/cfg.c
so that mac80211 essentially becomes single-threaded.

> We can also delay the scan if we are in the middle of {add,del}BA
> handshake, which is the only flow I can think about that needs
> responsiveness. The other frame exchanges are MLME ones and involve
> the wpa_supplicant (unless we are using the late WEXT). Hopefully the
> wpa_supplicant won't request to scan in the middle of association or
> so. There might be other features (mesh or whatever), that may be
> hidden from the wpa_supplicant and require good responsiveness from
> the wq too.

Hm, yeah, that would be an idea too, but I'm not sure it's easy to do
right now.

johannes


  reply	other threads:[~2011-12-15 14:07 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  6:01 iwlagn is getting very shaky Norbert Preining
2011-10-19  6:09 ` David Rientjes
2011-10-19  6:11   ` Pekka Enberg
2011-10-19  5:55     ` Guy, Wey-Yi
2011-10-19  6:48       ` Norbert Preining
2011-10-19  6:15         ` Guy, Wey-Yi
2011-10-19  7:19           ` Pekka Enberg
2011-10-19  6:44             ` Guy, Wey-Yi
2011-10-20  9:12               ` Pekka Enberg
2011-10-19  6:39         ` Guy, Wey-Yi
2011-10-19 12:49           ` Norbert Preining
2011-10-19 15:31             ` wwguy
2011-10-20  2:02               ` Norbert Preining
2011-10-20  1:32                 ` Guy, Wey-Yi
2011-10-20  2:51                   ` Norbert Preining
2011-10-20  2:55                     ` Guy, Wey-Yi W
2011-10-20  3:14                       ` Norbert Preining
2011-10-20  5:30                         ` David Rientjes
2011-10-19  6:25   ` Norbert Preining
2011-10-19  5:48     ` Guy, Wey-Yi
2011-10-19  6:46       ` Norbert Preining
2011-10-19  6:13         ` Guy, Wey-Yi
2011-10-20  4:59       ` Norbert Preining
2011-10-20  7:40         ` Johannes Berg
2011-10-20 13:45           ` Norbert Preining
2011-10-20 13:50             ` Johannes Berg
2011-10-20 13:54               ` Norbert Preining
2011-10-21  1:23           ` Norbert Preining
2011-10-21  7:26             ` Johannes Berg
2011-10-20 14:10         ` wwguy
2011-10-21  1:24           ` Norbert Preining
2011-10-23 21:26             ` David Rientjes
2011-10-26  2:50               ` Norbert Preining
2011-10-26  3:55                 ` wwguy
2011-10-26  4:03                   ` Norbert Preining
2011-10-26  4:00                     ` wwguy
2011-10-26  4:34                       ` Norbert Preining
2011-10-26  4:54                         ` Richard Yao
2011-10-26 19:56                           ` [Ilw] " wwguy
2011-10-26 19:36                         ` wwguy
2011-11-02  3:13                     ` Norbert Preining
2011-11-02  3:21                       ` Guy, Wey-Yi
2011-11-04  0:56                         ` Richard Yao
2011-11-04  4:58                         ` Norbert Preining
2011-11-07 12:38                           ` Norbert Preining
2011-11-07 23:37                             ` Guy, Wey-Yi
2011-11-08  4:32                               ` Norbert Preining
2011-11-08  8:07                                 ` Emmanuel Grumbach
2011-11-08  8:24                                   ` Emmanuel Grumbach
2011-11-09  5:11                                     ` Norbert Preining
2011-11-09  7:15                                       ` Emmanuel Grumbach
2011-11-21  3:06                                         ` Norbert Preining
2011-11-21 13:59                                           ` Emmanuel Grumbach
2011-11-21 23:24                                             ` Norbert Preining
2011-11-22  0:24                                               ` Norbert Preining
2011-11-22  5:13                                             ` Norbert Preining
2011-11-22  6:46                                               ` Emmanuel Grumbach
2011-11-22  6:48                                                 ` Emmanuel Grumbach
2011-11-22  7:27                                                   ` Norbert Preining
2011-11-22  7:45                                                     ` Emmanuel Grumbach
2011-11-22  7:54                                                       ` Norbert Preining
2011-11-22  8:11                                                         ` Emmanuel Grumbach
2011-11-22 12:43                                                           ` Norbert Preining
2011-11-22 14:15                                                             ` Emmanuel Grumbach
2011-11-23  1:55                                                               ` Norbert Preining
2011-11-24  6:47                                                                 ` Emmanuel Grumbach
2011-11-24 23:02                                                                   ` Norbert Preining
2011-11-25  4:50                                                                     ` Emmanuel Grumbach
2011-11-25 12:21                                                                   ` Norbert Preining
2011-11-25 12:31                                                                     ` Emmanuel Grumbach
2011-11-25 12:37                                                                       ` Norbert Preining
2011-11-27  6:38                                                                         ` Emmanuel Grumbach
2011-11-27  9:43                                                                           ` Emmanuel Grumbach
2011-11-27  9:46                                                                             ` Johannes Berg
2011-11-27 10:44                                                                               ` Emmanuel Grumbach
2011-11-28  3:56                                                                                 ` Norbert Preining
     [not found]                                                                                   ` <CANUX_P2kYiFCP8uAhLZC_kVEjoyxabRBx3Pn+ndtFus=6hJN7Q@mail.gmail.com>
2011-11-28  4:23                                                                                     ` Norbert Preining
2011-11-28  6:33                                                                                       ` Emmanuel Grumbach
2011-11-28 23:25                                                                                       ` Norbert Preining
2011-11-29  6:59                                                                                         ` Emmanuel Grumbach
2011-11-29  7:48                                                                                           ` Jeff Chua
2011-11-29  7:50                                                                                             ` Emmanuel Grumbach
2011-11-29  8:31                                                                                           ` Johannes Berg
2011-11-29  9:19                                                                                             ` Emmanuel Grumbach
2011-11-29  9:32                                                                                               ` Norbert Preining
2011-12-01  3:17                                                                                                 ` Norbert Preining
2011-12-11  9:24                                                                                             ` Emmanuel Grumbach
2011-12-11 19:56                                                                                               ` Emmanuel Grumbach
2011-12-15 14:07                                                                                                 ` Johannes Berg [this message]
2011-11-16 13:40                                       ` Richard Yao
2011-11-21  3:03                                         ` Norbert Preining
2011-10-26  4:19 ` Richard Yao
2011-10-27  0:05   ` Fwd: " Richard Yao
2011-10-27  3:48     ` Guy, Wey-Yi W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323958053.3337.48.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davej@redhat.com \
    --cc=egrumbach@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=preining@logic.at \
    --cc=rientjes@google.com \
    --cc=wey-yi.w.guy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).