Re: [PATCH v4 7/9] KVM-GST: KVM Steal time accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux