Re: [PATCH 1/2] amd76x_pm: C2 powersaving for AMD K7

From: Arjan van de Ven
Date: Sun Jan 08 2006 - 14:09:06 EST


On Sun, 2006-01-08 at 20:03 +0100, Joerg Sommrey wrote:
> + * Locking is done using atomic_t variables, no spin locks needed.

but... there seems to be a race now:
+ smp_mb();
+ if (unlikely(atomic_read(&amd76x_stat.num_idle)
+ == num_online)) {
+ /* Invoke C2 */
+ prs->C2_cnt++;
+ inb(amd76x_pm_cfg.C2_reg);
+ break;
+ }


also.. atomic_t + manual interrupt disabling isn't by definition better
than a spinlock... when people say "spinlocks are expensive" they imply
that atomics are also expensive...

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