lkml.org 
[lkml]   [2009]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] cpuacct: add a branch prediction
From
Date
On Thu, 2009-02-26 at 20:17 +0900, KAMEZAWA Hiroyuki wrote:
> Peter Zijlstra さんは書きました:
> > On Thu, 2009-02-26 at 19:28 +0900, KAMEZAWA Hiroyuki wrote:
> >
> >> Taking hierarchy mutex while reading will make read-side stable.
> >
> > We're talking about scheduling here, taking a mutex to stop scheduling
> > won't work, nor will it be acceptible to use anything that will.
> >
> No mutex is necessary, anyway.
> hierarchy-walker function completely works well under rcu read lock,
> if small jitter is allowed.

Right, should be doable -- and looking at the code, we have this
horrible 32 bit exception in there that locks the rq in order to read
the 64bit value.

Would be grand to get rid of that,. how bad would it be for userspace to
get the occasionally fubarred value?

But aside from that, the cpu controller itself is also summing directly
up the hierarchy, so cpuacct doing the same doesn't seem odd.

--
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: 2009-02-26 12:31    [from the cache]
©2003-2011 Jasper Spaans