lkml.org 
[lkml]   [2011]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 7/9] KVM-GST: KVM Steal time accounting
    From
    Date
    On Fri, 2011-07-01 at 17:22 -0400, Glauber Costa wrote:
    > @@ -3929,6 +3945,23 @@ void account_process_tick(struct task_struct *p, int user_tick)
    > return;
    > }
    >
    > +#ifdef CONFIG_PARAVIRT
    > + if (static_branch(&paravirt_steal_enabled)) {
    > + u64 steal, st = 0;
    > +
    > + steal = paravirt_steal_clock(smp_processor_id());
    > + steal -= this_rq()->prev_steal_time;
    > +
    > + st = steal_ticks(steal);
    > + this_rq()->prev_steal_time += st * TICK_NSEC;
    > +
    > + if (st) {
    > + account_steal_time(st);
    > + return;
    > + }
    > + }
    > +#endif
    > +
    > if (user_tick)
    > account_user_time(p, cputime_one_jiffy, one_jiffy_scaled);
    > else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET))

    So I was about to send an Ack for this patch, when I noticed that this
    will all be dead code when CONFIG_IRQ_TIME_ACCOUNTING &&
    sched_clock_irqtime.

    I think irqtime_account_process_tick() wants a similar hunk (which
    suggests splitting it out into an inline function).


    \
     
     \ /
      Last update: 2011-07-02 12:35    [W:0.021 / U:92.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site