Re: [PATCH 1/2] sched: Fix the irqtime code to deal with u64 wraps

From: Peter Zijlstra
Date: Wed Dec 15 2010 - 13:24:36 EST


On Wed, 2010-12-15 at 10:16 -0800, Venkatesh Pallipadi wrote:
> Peter,
>
> This looks like something that happened while splitting this into two
> patches. I needed a trivial change like below before I could apply
> these two patches on linus-git.
>
> Thanks,
> Venki
> ---
> @@ -641,17 +641,18 @@ static void sched_irq_time_avg_update(struct rq
> *rq, u64 irq_time);
>
> inline void update_rq_clock(struct rq *rq)
> {
> - if (!rq->skip_clock_update) {
> - int cpu = cpu_of(rq);
> - u64 irq_time;
> + int cpu = cpu_of(rq);
> + u64 irq_time;
>
> - rq->clock = sched_clock_cpu(cpu);
> - irq_time = irq_time_cpu(cpu);
> - if (rq->clock - irq_time > rq->clock_task)
> - rq->clock_task = rq->clock - irq_time;
> + if (rq->skip_clock_update)
> + return;
>
> - sched_irq_time_avg_update(rq, irq_time);
> - }
> + rq->clock = sched_clock_cpu(cpu);
> + irq_time = irq_time_cpu(cpu);
> + if (rq->clock - irq_time > rq->clock_task)
> + rq->clock_task = rq->clock - irq_time;
> +
> + sched_irq_time_avg_update(rq, irq_time);
> }
>
> /*


That's due another patch in tip/sched/urgent


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/