[BUG] 2.6.37-rc3 massive interactivity regression on ARM

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Dec 10 14:17:20 EST 2010


On Fri, Dec 10, 2010 at 07:10:54PM +0100, Peter Zijlstra wrote:
> On Fri, 2010-12-10 at 17:56 +0000, Russell King - ARM Linux wrote:
> > On Fri, Dec 10, 2010 at 02:47:46PM +0100, Peter Zijlstra wrote:
> > >  inline void update_rq_clock(struct rq *rq)
> > >  {
> > > -	int cpu = cpu_of(rq);
> > > -	u64 irq_time;
> > > +	s64 delta;
> > >  
> > >  	if (rq->skip_clock_update)
> > >  		return;
> > >  
> > > -	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;
> > > +	delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;
> > > +	rq->clock += delta;
> > 
> > Hmm.  Can you tell me how this is different to:
> > 
> > 	new_clock = sched_clock_cpu(cpu_of(rq));
> > 	delta = new_clock - rq->clock;
> > 	rq->clock = new_clock;
> > 
> > which I think may be simpler in terms of 64-bit math for 32-bit compilers
> > to deal with?
> 
> Its not, I could write it like that, the only reason I didn't is because
> it uses an extra variable. If gcc on 32bit targets really generates
> hideous code for it I'll happily change it.

Well, I can't tell you what kind of code this produces on ARM, as it
doesn't appear to apply to any kernel I've tried.  So, I assume it's
against some scheduler development tree rather than Linus' tree?



More information about the linux-arm-kernel mailing list