All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Yong Zhang <yong.zhang0@gmail.com>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>,
	LKML <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] timers: consider slack value in mod_timer()
Date: Wed, 25 May 2011 12:57:28 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1105251256270.3078@ionos> (raw)
In-Reply-To: <alpine.LFD.2.02.1105251126590.3078@ionos>

On Wed, 25 May 2011, Thomas Gleixner wrote:
> On Wed, 25 May 2011, Yong Zhang wrote:
>  	} else {
> -		unsigned long now = jiffies;
> +		long delta = expires - jiffies;
> +
> +		if (delta < 256)
> +			return expires;
>  
> -		/* No slack, if already expired else auto slack 0.4% */
> -		if (time_after(expires, now))
> -			expires_limit = expires + (expires - now)/256;
> +		expires_limit = expires + (expires - now)/256;

That should be

+		expires_limit = expires + delta / 256;

of course.


  reply	other threads:[~2011-05-25 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21 10:58 [PATCH] timers: consider slack value in mod_timer() Sebastian Andrzej Siewior
2011-05-24  7:54 ` Yong Zhang
2011-05-24 12:13   ` Sebastian Andrzej Siewior
2011-05-25  8:35     ` Yong Zhang
2011-05-25 10:17       ` Thomas Gleixner
2011-05-25 10:57         ` Thomas Gleixner [this message]
2011-05-26  6:19         ` Yong Zhang
2011-06-03 13:06 ` [tip:timers/urgent] timers: Consider " tip-bot for Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.02.1105251256270.3078@ionos \
    --to=tglx@linutronix.de \
    --cc=Trond.Myklebust@netapp.com \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian@breakpoint.cc \
    --cc=yong.zhang0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.