From: john stultz <johnstul@us.ibm.com>
To: "Petr Titěra" <petr@titera.eu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Wrong atime on recent kernels
Date: Mon, 21 Dec 2009 13:16:14 -0800 [thread overview]
Message-ID: <1261430174.5293.43.camel@localhost.localdomain> (raw)
In-Reply-To: <4B2EB3BC.6030900@titera.eu>
On Mon, 2009-12-21 at 00:31 +0100, Petr Titěra wrote:
> Petr Titěra napsal(a):
> > john stultz napsal(a):
> >> Let me know if you find anything that helps narrow this down.
> >>
> >
> > I know its far fetched, but is there something what is preventing
> > xtime.tv_nsec to be exactly 999999999 near the end of update_wall_time
> > in kernel/time/timekeeping.c?
> >
> Just to follow up. I'm asking because I see a lot of files with access
> and/or modify times near the top of thousanth of second (see
> `/etc/sysconfig/prelink' in my example) and I thing that addition of 1
> to xtime.tv_nsec ath the end of update_wall_time can 'owerflow' to whole
> second.
Oof! Yikes.
Yea, the sub-nanosecond rounding fix we added quite awhile back indeed
opens a hole where xtime.tv_nsec could be exactly 1sec. Good eye!
Of course, most of the timekeeping accessors handle this properly by
normalizing the timespec before returning, so its likely just users of
current_kernel_time() and direct accessors of xtime that might be bitten
here.
And this probably was obscured before because the xtime_cache() was
normalized. Did you verify that reverting that patch I pointed you to
resolves the issue? If not, please do, so we can get this fixed up.
Now I'm a little baffled why you see it all the time on your boxes. For
this to trigger, you have to have an interrupt in the last ns of a
second, and then the window for these odd filesystem stamps is only open
for 1-10ms.
Sigh. Once we get the last of the non GENERIC_TIME arches converted to
arch_gettimeoffset, we can kill all of those rounding hacks and just
manage the sub-nanosecond portion sanely. I'm looking forward to that
day!
So again, Bravo on catching this!
thanks
-john
next prev parent reply other threads:[~2009-12-21 21:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 21:17 Wrong atime on recent kernels Petr Titěra
2009-12-14 21:41 ` Andi Kleen
2009-12-14 21:59 ` Petr Titěra
2009-12-14 21:45 ` john stultz
[not found] ` <4B29494B.4010305@titera.eu>
2009-12-17 1:21 ` john stultz
2009-12-17 3:26 ` john stultz
2009-12-17 11:04 ` Petr Titěra
2009-12-17 21:19 ` john stultz
2009-12-18 3:13 ` john stultz
2009-12-20 22:29 ` Petr Titěra
2009-12-20 23:31 ` Petr Titěra
2009-12-21 21:16 ` john stultz [this message]
2009-12-22 15:50 ` Petr Titěra
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=1261430174.5293.43.camel@localhost.localdomain \
--to=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=petr@titera.eu \
/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.