lkml.org 
[lkml]   [2013]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [GIT PULL] cputime: Full dynticks task/cputime accounting v7
    On Mon, 28 Jan 2013, Frederic Weisbecker wrote:

    > 2013/1/28 Christoph Lameter <cl@linux.com>:
    > > On Mon, 28 Jan 2013, Frederic Weisbecker wrote:
    > >
    > >> My last concern is the dependency on CONFIG_64BIT. We rely on cputime_t
    > >> being u64 for reasonable nanosec granularity implementation. And therefore
    > >> we need a single instruction fetch to read kernel cpustat for atomicity
    > >> requirement against concurrent incrementation, which only 64 bit archs
    > >> can provide.
    > >
    > > Most x86 cpus support cmpxchg8b on 32bit which can be abused for
    > > 64 bit reads (see cmpxchg64 in cmpxchg_32.h). Simply do a cmpxchg with
    > > zero and use whatever it returns.
    > >
    > > A percpu version that uses the instruction is called
    > > this_cpu_cmpxchg_double().
    >
    > Yeah but we need to be able to do remote read. In fact atomic_read()
    > would do the trick.

    Well yes, cmpxchg64() could do the same without the need for an atomic
    variable.

    > >> There is just no emergency though as this new option depends on the context
    > >> tracking subsystem that only x86-64 (and soon ppc64) implements yet. And
    > >> this set is complex enough already. I think we can deal with that later.
    > >
    > > Ok then this may not be that useful.
    >
    > What is not useful?

    The information about the 64 bit reads that I posted.




    \
     
     \ /
      Last update: 2013-01-28 22:01    [W:4.270 / U:1.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site