mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [tip:timers/urgent] timers: Fix slack calculation really
       [not found] <tip-8e63d7795e30b4091e303cc8c060509bd8eea742@git.kernel.org>
@ 2010-05-25 19:12 ` Linus Torvalds
  0 siblings, 0 replies; only message in thread
From: Linus Torvalds @ 2010-05-25 19:12 UTC (permalink / raw)
  To: linux-kernel, mingo, hpa, arjan, tglx; +Cc: linux-tip-commits



On Tue, 25 May 2010, tip-bot for Thomas Gleixner wrote:
>  {
> -	unsigned long expires_limit, mask;
> +	unsigned long expires_limit, mask, now;
>  	int bit;
>  
>  	expires_limit = expires;
>  
> -	if (timer->slack > -1)
> +	if (timer->slack >= 0) {
>  		expires_limit = expires + timer->slack;
> -	else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
> -		expires_limit = expires + (expires - jiffies)/256;
> -
> +	} else {
> +		now = jiffies;

So this works, but I'd really suggest that you actually nest the 
declarations correctly too. 

		Linus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-25 19:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tip-8e63d7795e30b4091e303cc8c060509bd8eea742@git.kernel.org>
2010-05-25 19:12 ` [tip:timers/urgent] timers: Fix slack calculation really Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®