lkml.org 
[lkml]   [2006]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] amd76x_pm: C2 powersaving for AMD K7
From
Date
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@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: 2006-01-08 20:12    [W:0.040 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site