lkml.org 
[lkml]   [2009]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpuacct: add a branch prediction
Ingo Molnar writes:

> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> > On Thu, 2009-02-26 at 21:06 +0900, KAMEZAWA Hiroyuki wrote:
> > > Hmm.. some routine like
> > > atomic64_read() can help this ? (But I don't want to use atomic_t here..)
> >
> > Yeah, atomic64_t has been proposed numerous times, and x86
> > could actually implement that using cmpxchg8b, just not sure
> > about all the other 32bit archs, and if we start using it in
> > the scheduler, they'd better have it implemented.
>
> I have written a working atomic64_t implementation for
> tip:perfcounters/core, for 32-bit x86.

atomic64_t would be a big problem for 32-bit powerpc. We'd have to
use an array of spinlocks, or make atomic64_t actually be 12 bytes so
we have a lock word to use.

Paul.


\
 
 \ /
  Last update: 2009-02-27 06:01    [W:0.279 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site