[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060726143357.2f0787e7.akpm@osdl.org>
Date: Wed, 26 Jul 2006 14:33:57 -0700
From: Andrew Morton <akpm@...l.org>
To: Arjan van de Ven <arjan@...ux.intel.com>
Cc: vatsa@...ibm.com, torvalds@...l.org, davej@...hat.com,
mingo@...e.hu, 76306.1226@...puserve.com, ashok.raj@...el.com,
linux-kernel@...r.kernel.org
Subject: Re: [patch] Reorganize the cpufreq cpu hotplug locking to not be
totally bizare
On Wed, 26 Jul 2006 23:03:06 +0200
Arjan van de Ven <arjan@...ux.intel.com> wrote:
> I'm really starting to feel that the hotplug lock would have been better
> of being a refcount (with a waitqueue for zero) than a lock. While
> "refcount+waitqueue" sort of IS a lock, the semantics make more sense
> imo...
The mistake in the above paragraph is its use of the term "the hotplug
lock".
Think. We don't want to lock CPUs. We don't want to block plug/unplug
events.
What we _do_ want is for subsystems to be able to guarantee the stability
of their per-cpu data and the coherency of that data with cpu_online_map
and cpu_present_map.
We should delete lock_cpu_hotplug() and start again. Perhaps we can do
that post-2.6.18 if we can cobble the current stuff into some semi-working
state. But I doubt if it's very important really - we have heaps of code
in there which is already racy wrt hotplug and adding a little more isn't
likely to hurt.
I count 187 instances of for_each_online_cpu(), and most of them are racy.
There's just no way we can fix all these with lock_cpu_hotplug(). It
simply doesn't have a future.
-
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