From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: Bart Van Assche <bart.vanassche@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Arjan van de Ven <arjan@infradead.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel <linux-kernel@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [PATCH] timer: Fix jiffies wrap behavior of round_jiffies*()
Date: Wed, 29 May 2013 21:50:05 -0700 [thread overview]
Message-ID: <20130529215005.c91c75de.akpm@linux-foundation.org> (raw)
In-Reply-To: <1369872829.22004.129.camel@joe-AO722>
On Wed, 29 May 2013 17:13:49 -0700 Joe Perches <joe@perches.com> wrote:
> On Wed, 2013-05-29 at 16:38 -0700, Andrew Morton wrote:
> > On Wed, 29 May 2013 16:17:47 -0700 Joe Perches <joe@perches.com> wrote:
> >
> > > > We could perhaps have a checkpatch rule
> > > > which looks for comparisons against jiffes (and any other
> > > > time-measuring variables we can detect)
> > >
> > > other variables like?
> >
> > Grepping for time_after finds a bunch. There's no real pattern to it though.
>
> get_jiffies_64() should probably be added as
> another test too.
>
> Also, these might be wrong:
>
> arch/arm/kernel/smp_twd.c: while (get_jiffies_64() < waitjiffies)
> arch/arm/kernel/smp_twd.c: while (get_jiffies_64() < waitjiffies)
> fs/fuse/dir.c: else if (fuse_dentry_time(entry) < get_jiffies_64()) {
> fs/fuse/dir.c: if (fi->i_time < get_jiffies_64()) {
> fs/fuse/dir.c: if (fi->i_time < get_jiffies_64()) {
>
Yup. Normally a 64-bit jiffy will wrap around shortly after the heat
death of the universe, but
a) it's derived from jiffies, which we evilly cause to wrap after 5
minutes uptime and
b) it's derived from jiffies, which is 32-bit on 32-bit and hence
wraps every 49 days (HZ=1000).
next prev parent reply other threads:[~2013-05-30 4:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 18:43 [PATCH] timer: Fix jiffies wrap behavior of round_jiffies*() Bart Van Assche
2013-05-29 23:01 ` Andrew Morton
2013-05-29 23:17 ` Joe Perches
2013-05-29 23:38 ` Andrew Morton
2013-05-29 23:48 ` Joe Perches
2013-05-30 0:13 ` Joe Perches
2013-05-30 4:50 ` Andrew Morton [this message]
2013-05-30 6:19 ` Bart Van Assche
2013-06-28 15:12 ` [tip:timers/core] timer: Fix jiffies wrap behavior of round_jiffies_common() tip-bot for Bart Van Assche
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=20130529215005.c91c75de.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=bart.vanassche@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/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.