lkml.org 
[lkml]   [2007]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] workqueue: debug flushing deadlocks with lockdep

* Oleg Nesterov <oleg@tv-sign.ru> wrote:

> Currently it is allowed that work->func() does flush_workqueue() on
> its own workqueue. So we have
>
> run_workqueue()
> work->func()
> flush_workqueue()
> run_workqueue()
>
> All but work->func() take wq->lockdep_map, I guess check_deadlock()
> won't be happy.

yep.

> OTOH. Perhaps we can can forbid such a behaviour? Andrew, do you know
> any good example of "keventd trying to flush its own queue" ?

i'd prefer to make the API a little bit stricter: such recursion is
nasty. Btw., what mechanism prevents the second instance of
run_workqueue() calling into a work->func() again?

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-05 16:43    [W:0.188 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site