linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Tejun Heo <tj@kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211:  Fix deadlock in ieee80211_do_stop.
Date: Thu, 18 Nov 2010 09:55:30 -0800	[thread overview]
Message-ID: <4CE56892.9090606@candelatech.com> (raw)
In-Reply-To: <4CE4D41F.1080005@kernel.org>

On 11/17/2010 11:22 PM, Tejun Heo wrote:
> Hello, Johannes.
>
> On 11/18/2010 08:07 AM, Johannes Berg wrote:
>>> I see.  In the longer run tho, it would be much better to convert to
>>> NRT workqueue.  The behavior would be more robust with much lower
>>> latencies.
>>
>> I really don't think it's possible without going to some scheme
>> where we use a single work struct and kick off things out of it,
>> or implement our own threading or similar things ...
>
> I see.
>
>> But why is this unreliable and/or high latency anyway?
>
> Oh, no, it's not unreliable or high latency on workqueue side.  It's
> just error prone for its users.  As there is only single executino
> resource by definition, any single work can stall the whole queue and
> it also is easy to create a deadlock by introducing circular
> dependency.  For example, mac80211 uses system wq for restart work and
> that's to avoid grabbing rtnl_lock from a work as that will introduce
> a deadlock, right?  If you use non-ordered workqueues, you don't need
> to worry about those artificial dependencies.
>
>> It used to be just fine .. maybe this is one of the cases where we
>> should actually be using a dedicated thread ...
>
> Oh, trust me, that won't change anything.  If there's a bug in
> workqueue (I don't think this is the case here tho), let's fix it.  If
> mac80211 is somehow tripping a deadlock around single execution
> resource, let's fix the culprit.  Okay?  At this point, all we need is
> a proper task dump to see who's holding what where.

I understand your desire for a stack dump, but it appears that sysrq-t
isn't getting everything you want, for whatever reason.

Does my explanation of the rtnl deadlock that I posted near the beginning
of this thread (with some backtraces to back that up) make sense, or
are my assumptions invalid?

Thanks,
Ben

>
> Thanks.
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  parent reply	other threads:[~2010-11-18 17:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 20:07 [PATCH] mac80211: Fix deadlock in ieee80211_do_stop greearb
2010-11-12 20:08 ` Luis R. Rodriguez
2010-11-12 20:16   ` Ben Greear
2010-11-12 20:49 ` Johannes Berg
2010-11-12 20:57   ` Ben Greear
2010-11-12 21:08     ` Johannes Berg
2010-11-12 21:51       ` Ben Greear
2010-11-13 10:34       ` Tejun Heo
2010-11-15 21:16         ` Ben Greear
2010-11-16 14:19           ` Tejun Heo
2010-11-16 16:51             ` Ben Greear
2010-11-17  8:55               ` Tejun Heo
2010-11-17 17:37                 ` Ben Greear
2010-11-16 17:40             ` Johannes Berg
2010-11-17  8:47               ` Tejun Heo
2010-11-17 18:53                 ` Johannes Berg
2010-11-17 18:59                   ` Ben Greear
2010-11-17 19:03                     ` Johannes Berg
2010-11-18  6:34                   ` Tejun Heo
2010-11-18  7:07                     ` Johannes Berg
2010-11-18  7:22                       ` Tejun Heo
2010-11-18 16:59                         ` Johannes Berg
2010-11-19 14:34                           ` Tejun Heo
2010-11-19 17:57                             ` Johannes Berg
2010-11-19 20:55                               ` Ben Greear
2010-11-19 22:27                                 ` Luis R. Rodriguez
2010-12-08 17:36                                   ` Ben Greear
2010-12-08 18:19                                     ` Ben Greear
2010-12-08 18:28                                       ` Ben Greear
2010-12-09 14:34                                         ` Tejun Heo
2010-12-09 14:42                                           ` Johannes Berg
2010-12-09 14:46                                             ` Tejun Heo
2010-12-09 16:17                                               ` Tejun Heo
     [not found]                                                 ` <4D0156F6.4000306@candelate ch.com>
2010-12-09 17:27                                                 ` Ben Greear
2010-12-09 22:23                                                 ` Ben Greear
2010-12-10 15:11                                                   ` Tejun Heo
2010-12-10 16:35                                                     ` Ben Greear
2010-11-18 17:55                         ` Ben Greear [this message]
2010-11-18 18:04                           ` Tejun Heo
2010-11-18 18:11                             ` Ben Greear
2010-11-17 20:13             ` 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=4CE56892.9090606@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tj@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).