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.
next prev parent reply other threads:[~2011-05-25 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110521105828.GA29442@Chamillionaire.breakpoint.cc>
[not found] ` <BANLkTinGZ0L4oQkBYo9H=R==X5Z+efjRaQ@mail.gmail.com>
[not found] ` <20110524121343.GA17312@Chamillionaire.breakpoint.cc>
[not found] ` <BANLkTikNSa9otE_cFKRcThUZ5ZCtE7Kyxw@mail.gmail.com>
2011-05-25 10:17 ` [PATCH] timers: consider slack value in mod_timer() Thomas Gleixner
2011-05-25 10:57 ` Thomas Gleixner [this message]
2011-05-26 6:19 ` Yong Zhang
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox