Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936471AbWLITrr (ORCPT ); Sat, 9 Dec 2006 14:47:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S936476AbWLITrr (ORCPT ); Sat, 9 Dec 2006 14:47:47 -0500 Received: from smtp.osdl.org ([65.172.181.25]:44054 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936471AbWLITrq (ORCPT ); Sat, 9 Dec 2006 14:47:46 -0500 Date: Sat, 9 Dec 2006 11:47:23 -0800 From: Andrew Morton To: Ingo Molnar Cc: vatsa@in.ibm.com, Bjorn Helgaas , linux-kernel@vger.kernel.org, Myron Stowe , Jens Axboe , Dipankar , Gautham shenoy Subject: Re: workqueue deadlock Message-Id: <20061209114723.138b6e89.akpm@osdl.org> In-Reply-To: <20061209102652.GA16607@elte.hu> References: <200612061726.14587.bjorn.helgaas@hp.com> <20061207105148.20410b83.akpm@osdl.org> <20061207113700.dc925068.akpm@osdl.org> <20061208025301.GA11663@in.ibm.com> <20061207205407.b4e356aa.akpm@osdl.org> <20061209102652.GA16607@elte.hu> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 34 On Sat, 9 Dec 2006 11:26:52 +0100 Ingo Molnar wrote: > > * Andrew Morton wrote: > > > > > + if (cpu != -1) > > > > + mutex_lock(&workqueue_mutex); > > > > > > events/4 thread itself wanting the same mutex above? > > > > Could do, not sure. I'm planning on converting all the locking around > > here to preempt_disable() though. > > please at least use an owner-recursive per-CPU lock, a wot? > not a naked > preempt_disable()! The concurrency rules for data structures changed via > preempt_disable() are quite hard to sort out after the fact. > (preempt_disable() is too opaque, preempt_disable() is the preferred way of holding off cpu hotplug. > it doesnt attach data structure to > critical section, like normal locks do.) the data structure is the CPU, and its per-cpu data. And cpu_online_map. - 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/