Re: [RFC,PATCH] use nonatomic bitops for cpumask_t

From: Mikael Pettersson
Date: Sat May 29 2004 - 06:03:11 EST


On Sat, 29 May 2004 10:57:21 +0200, Manfred Spraul wrote:
>The default implementation for cpumasks in <asm-generic/cpumask*> uses
>atomic bitops for the operations that affect a single cpu and nonatomic
>operations for the rest.
>What about switching to nonatomic operations for all operations? I'm
>checking for callers that rely on the atomicity of the bitops, but so
>far everyone has it's own locks.

The perfctr kernel extension (not yet merged) calls
cpu_set() from a function invoked via smp_call_function(),
relying on cpu_set() being atomic.

I can take a spinlock there, but it seems ugly when an
atomic set_bit would suffice.

Also, may I request that when changing a fundamental aspect
of the semantics of an operation, you also change its name?
That way, unconverted code will get a compile or link error
rather than breaking at runtime.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/