[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1232622615.4890.114.camel@laptop>
Date: Thu, 22 Jan 2009 12:10:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Frédéric Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, Lai Jiangshan <laijs@...fujitsu.com>,
Oleg Nesterov <oleg@...sign.ru>,
Andrew Morton <akpm@...ux-foundation.org>,
Eric Dumazet <dada1@...mosbay.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] workqueue: not allow recursion run_workqueue
On Thu, 2009-01-22 at 12:06 +0100, Frédéric Weisbecker wrote:
> Ok.
> Oh but I haven't seen that Oleg said he prefered bug_on, because the
> system will deadlock instead....hmm...
>
> Or perhaps keeping the things like the old way, but with a WARN_ONCE:
>
> if (cwq->thread == current) {
> /*
> * Don't ever think to flush workqueue from a work
> */
> WARN_ONCE(1);
>
> run_workqueue(cwq);
> active = 1;
> }
>
> And then, the workqueue will flush...so it will behave correctly but
> will warn on this bad developer idea of flushing from a work.
lockdep already yells at you for doing that, and developers should run
with lockdep enabled -- or at least test stuff with lockdep enabled, so
I'm not exactly seeing what this will buy us.
> Actually I don't understand when Lai says that it will actually not flush.
Yeah, his changelog is an utter mistery to many..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists