Re: Incorrect circular locking dependency?

From: David Howells
Date: Tue Aug 04 2009 - 11:50:43 EST


Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> Creating a new class for your second workqueue might help,

I only have one workqueue. The problem is there are two waitqueues, but
init_waitqueue_head() always sets q->lock to the same class.

> we'd have to pass a second key through __create_workqueue_key() and pass
> that into init_cpu_workqueue() and apply it to cwq->lock using
> lockdep_set_class() and co.

Actually, wouldn't just making init_cpu_workqueue() apply a class to
cwq->more_work that's common to all workqueues suffice? Or even, have
init_waitqueue_head() apply an alternate class to q->lock?

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