From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932904AbZHDPuh (ORCPT ); Tue, 4 Aug 2009 11:50:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932806AbZHDPug (ORCPT ); Tue, 4 Aug 2009 11:50:36 -0400 Received: from mx2.redhat.com ([66.187.237.31]:41013 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932717AbZHDPug (ORCPT ); Tue, 4 Aug 2009 11:50:36 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1249397486.7924.243.camel@twins> References: <1249397486.7924.243.camel@twins> <6950.1245661098@redhat.com> <24075.1248705430@redhat.com> To: Peter Zijlstra Cc: dhowells@redhat.com, Takashi Iwai , Ingo Molnar , Linux filesystem caching discussion list , LKML , Johannes Berg , oleg Subject: Re: Incorrect circular locking dependency? Date: Tue, 04 Aug 2009 16:50:04 +0100 Message-ID: <18723.1249401004@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra 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