lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Dec 2010 17:56:45 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Venkatesh Pallipadi <venki@...gle.com>,
	Mikael Pettersson <mikpe@...uu.se>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	John Stultz <johnstul@...ibm.com>
Subject: Re: [BUG] 2.6.37-rc3 massive interactivity regression on ARM

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?

In terms of the wrap-around, I don't see this as any different from the
above, as:

	rq->clock += sched_clock_cpu(cpu_of(rq)) - rq_clock;
	rq->clock = rq->clock + sched_clock_cpu(cpu_of(rq)) - rq_clock;
	rq->clock = sched_clock_cpu(cpu_of(rq));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ