linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Ben Greear <greearb@candelatech.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: ath5k/mac80211:  Reproducible deadlock with 64-stations.
Date: Fri, 12 Nov 2010 11:11:09 +0100	[thread overview]
Message-ID: <4CDD12BD.7030208@kernel.org> (raw)
In-Reply-To: <4CDC7860.3070307@candelatech.com>

Hello,

On 11/12/2010 12:12 AM, Ben Greear wrote:
> The lockup (or extreme slowdown?) happens before the
> serious memory pressure.
> 
> One thing I noticed is that at one point near (at?) the beginning
> of the slowdown, it took 36-seconds to complete the
> flush_work() call in ieee80211_do_stop in iface.c
> 
> From some printk's I added:
> 
> Nov 11 14:58:13 localhost kernel: do_stop: sta14 flushing work: e51298b4
> Nov 11 14:58:49 localhost kernel: do_stop: sta14 flushed.
> 
> It is holding RTNL for this entire time, which of course stops
> a large number of other useful processes from making
> progress.
> 
> Is there any good reason for the flush to take so long?

It depends on what the work being flushed was doing.  Which one is it
trying to flush?  Also, if the memory pressure is high enough, due to
the dynamic nature of workqueue, processing of works can be delayed
while trying to create new workers to process them.  Situations like
that usually don't happen often as it's likely that workers get freed
up as other works finish; however, if workers are piling up on
rtnl_lock, there really isn't much it can do.  If there's work user
which can behave like that, it would be a good idea to restrict its
maximum concurrency using a separate workqueue.

Thanks.

-- 
tejun

  reply	other threads:[~2010-11-12 10:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 23:02 ath5k/mac80211: Reproducible deadlock with 64-stations Ben Greear
2010-11-11  0:57 ` Ben Greear
2010-11-11  1:03   ` Johannes Berg
2010-11-11  5:51     ` Ben Greear
2010-11-11  1:02 ` Johannes Berg
2010-11-11  9:27   ` Tejun Heo
2010-11-11 16:55     ` Ben Greear
2010-11-11 18:26       ` Ben Greear
2010-11-11 23:12         ` Ben Greear
2010-11-12 10:11           ` Tejun Heo [this message]
2010-11-12 10:15             ` Tejun Heo
2010-11-12 18:06               ` Ben Greear
2010-11-12 18:13                 ` Tejun Heo
2010-11-12 18:34                   ` Ben Greear
2010-11-12 17:18             ` Ben Greear
2010-11-12  0:48       ` Ben Greear
2010-11-12  2:37         ` Johannes Berg
2010-11-12 16:32           ` Ben Greear
2010-11-12 16:45             ` Johannes Berg
2010-11-12 17:37               ` Ben Greear

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=4CDD12BD.7030208@kernel.org \
    --to=tj@kernel.org \
    --cc=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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).