[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0607261319160.4168@g5.osdl.org>
Date: Wed, 26 Jul 2006 13:22:24 -0700 (PDT)
From: Linus Torvalds <torvalds@...l.org>
To: Arjan van de Ven <arjan@...ux.intel.com>
cc: Dave Jones <davej@...hat.com>, Ingo Molnar <mingo@...e.hu>,
Chuck Ebbert <76306.1226@...puserve.com>,
Ashok Raj <ashok.raj@...el.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...l.org>
Subject: Re: [patch] Reorganize the cpufreq cpu hotplug locking to not be
totally bizare
On Wed, 26 Jul 2006, Arjan van de Ven wrote:
>
> As a quick hack I made non-lock_cpu_hotplug()'ing versions of the 3 key
> workqueue functions (patch below). It works, it's correct, it's just so
> ugly that I'm almost too ashamed to post it. I haven't found a better
> solution yet though... time to take a step back I suppose.
That really is _way_ too ugly for words.
For 2.6.18, we may just have to leave the recursive locking in place, and
just remove the warning. With the recursive lock, if/when somebody needs
to take that lock early, the code can just do so, and then the inner
lock-taker ends up being a no-op.
Of course, that's why people want recursive locks in the first place, and
it's also why we've (largely successfully) have avoided them - it allows
for people being way too lazy about locking, and allows for really broken
schenarios like this.
I wonder if we could just make the workqueue code just run with preemption
disabled - that should also automatically protect against any CPU hotplug
events on the local CPU (and I think "local CPU" is all that the wq code
cares about, no?)
Linus
-
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