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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux