From: Johannes Berg <johannes@sipsolutions.net>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@redhat.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
mingo@elte.hu, Thomas Sattler <tsattler@gmx.de>
Subject: Re: [RFC/PATCH] debug workqueue deadlocks with lockdep
Date: Wed, 04 Jul 2007 15:57:59 +0200 [thread overview]
Message-ID: <1183557479.3812.24.camel@johannes.berg> (raw)
In-Reply-To: <20070704125219.GA98@tv-sign.ru>
[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]
On Wed, 2007-07-04 at 16:52 +0400, Oleg Nesterov wrote:
> Yes. And no other work (except a barrier) can run before the caller of
> wait_on_work() is woken.
Alright, thanks. Yes, then what you proposed makes a lot of sense, I'll
implement it.
> Aha, now I see where I was confused. Yes, we can't avoid the false positives
> with flush_workqueue().
>
> I hope this won't be a problem, because almost every usage of flush_workqueue()
> is pointless nowadays. So even if we have a false positive, it probably
> means the code needs cleanups anyway.
>
> But see below,
[...]
> If you are going to do this, may I suggest you to make 2 separate patches?
> Exactly because we can't avoid the false positives with flush_workqueue(),
> it would be nice if we have an option to revert the 2-nd patch if there are
> too many false positives (I hope this won't happen).
I've run this patch on my system for a few days now and only seen
exactly one warning; however, it's *not* actually a *false* positive,
it's a positive but it's also perfectly possible to deadlock if the
system is loaded more than one work item is stuck on the workqueue for
some reason. Say A takes L1 and B runs without locks, and then you flush
the workqueue under L1; you'll get a real deadlock when both A and B are
actually scheduled to run!
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2007-07-04 13:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 18:40 [RFC/PATCH] debug workqueue deadlocks with lockdep Johannes Berg
2007-06-28 16:33 ` Johannes Berg
2007-06-28 17:33 ` Johannes Berg
2007-06-30 8:05 ` Ingo Molnar
2007-06-30 11:46 ` Oleg Nesterov
2007-07-02 8:37 ` Johannes Berg
2007-07-02 13:03 ` Johannes Berg
2007-07-03 17:31 ` Oleg Nesterov
2007-07-03 19:42 ` Ingo Molnar
2007-07-04 11:49 ` Johannes Berg
2007-07-04 12:21 ` Ingo Molnar
2007-07-04 13:59 ` Johannes Berg
2007-07-04 12:25 ` Ingo Molnar
2007-07-04 12:52 ` Oleg Nesterov
2007-07-04 13:57 ` Johannes Berg [this message]
2007-07-05 8:43 ` Ingo Molnar
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=1183557479.3812.24.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=a.p.zijlstra@chello.nl \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=oleg@tv-sign.ru \
--cc=tsattler@gmx.de \
/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