lkml.org 
[lkml]   [2004]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [CPU-HOTPLUG] convert cpucontrol to be a rwsem
On Mon, 1 Nov 2004, Dominik Brodowski wrote:

> [CPU-HOTPLUG] Use a rw-semaphore for serializing and locking
>
> Currently, lock_cpu_hotplug serializes multiple calls to cpufreq->target()
> on multiple CPUs even though that's unneccessary. Even further, it
> serializes these calls with totally unrelated other parts of the kernel...
> some ppc64 event reporting, some cache management, and so on. In my opinion
> locking should be done subsystem (and normally data-)specific, and disabling
> CPU hotplug should just do that.
>
> This patch converts the semaphore cpucontrol to be a rwsem which allows us
> to use it for _both_ variants: locking (write) and (multiple) other parts
> disabling CPU hotplug (read).
>
> Only problem I see with this approach is that lock_cpu_hotplug_interruptible()
> needs to disappear as there is no down_write_interruptible() for rw-semaphores.
>
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>

Agreed it makes a lot more sense, i think there could be some places where
we use preempt_disable to protect against cpu offline which could
converted, but that can come later.

Thanks,
Zwane

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans