lkml.org 
[lkml]   [2013]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 09/10] sched: task_sched_runtime introduce micro optimization
    > Stronger:
    >
    > +#ifdef CONFIG_64BIT
    > + if (!p->on_cpu)
    > + return p->se.sum_exec_runtime;
    > +#endif
    >
    > [ Or !p->on_cpu || !add_delta ].
    >
    > We can take the racy read versus p->on_cpu since:
    > If we race with it leaving cpu: we take lock, we're correct
    > If we race with it entering cpu: unaccounted time ---> 0, this is
    > indistinguishable from the read occurring a few cycles earlier.

    OK, agreed. That's nice.




    \
     
     \ /
      Last update: 2013-05-01 21:41    [W:4.045 / U:0.432 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site