Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754503Ab0LOSYd (ORCPT ); Wed, 15 Dec 2010 13:24:33 -0500 Received: from casper.infradead.org ([85.118.1.10]:36318 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404Ab0LOSYb convert rfc822-to-8bit (ORCPT ); Wed, 15 Dec 2010 13:24:31 -0500 Subject: Re: [PATCH 1/2] sched: Fix the irqtime code to deal with u64 wraps From: Peter Zijlstra To: Venkatesh Pallipadi Cc: Eric Dumazet , Russell King - ARM Linux , Mikael Pettersson , Ingo Molnar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, John Stultz , Christoph Lameter In-Reply-To: References: <1292013506.13513.78.camel@laptop> <1292242433.6803.199.camel@twins> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 15 Dec 2010 19:24:12 +0100 Message-ID: <1292437452.2708.45.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 49 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/