lkml.org 
[lkml]   [2011]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting
From
Date
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote:
> +static noinline bool touch_steal_time(int is_idle)

That noinline is very unlucky there,

> +{
> + u64 steal, st = 0;
> +
> + if (static_branch(&paravirt_steal_enabled)) {
> +
> + 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 (is_idle || st == 0)
> + return false;
> +
> + account_steal_time(st);
> + return true;
> + }
> + return false;
> +}
> +
> static void update_rq_clock_task(struct rq *rq, s64 delta)
> {
> s64 irq_delta;
> @@ -3716,6 +3760,9 @@ void account_user_time(struct task_struct *p,
> cputime_t cputime,
> struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
> cputime64_t tmp;
>
> + if (touch_steal_time(0))
> + return;

Means we have an unconditional call here, even if the static_branch() is
patched out.


\
 
 \ /
  Last update: 2011-06-30 23:57    [W:0.116 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site