From: john stultz <johnstul@us.ibm.com>
To: Srinivas Nayak <sinu_nayak2001@yahoo.co.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BUG: Is it a bug in Linux time() function or Linux OS calls?
Date: Wed, 10 Mar 2010 09:19:30 -0800 [thread overview]
Message-ID: <1f1b08da1003100919k57d8cc6au6ff753ebf5b6c2f8@mail.gmail.com> (raw)
In-Reply-To: <460422.78917.qm@web7603.mail.in.yahoo.com>
On Tue, Mar 9, 2010 at 11:59 PM, Srinivas Nayak
<sinu_nayak2001@yahoo.co.in> wrote:
> I wrote a small program, that creates files at an interval of 1 minute. But the time at which the file is created and last written and the last modification time of the file as shown by ls command differs by 1 second. The code and the output is presented below. please let me know where could be the bug?
>
[snip]
> Some system info:
> ===========
> Linux new 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux
> Gnu C 4.2.4
> Linux C Library 2.7
> binutils 2.18.0.20080103
> util-linux 2.13.1
> Console-tools 0.2.3
> Sh-utils 6.10
> ===========
Hrm. Is CONFIG_NO_HZ enabled? If so this is a known issue. The
filesystem timestamps use xtime, which is normally updated every HZ.
However to reduce overhead with NO_HZ we changed the update to be a
half-second, which can cause issues like what you describe.
The issue has since been resolved, so I'd be interested to hear if you
can still reproduce it on a more recent kernel.
thanks
-john
next prev parent reply other threads:[~2010-03-10 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 7:59 Srinivas Nayak
2010-03-10 8:47 ` David Newall
2010-03-10 9:13 ` Srinivas Nayak
2010-03-10 17:19 ` john stultz [this message]
2010-03-11 6:10 ` Srinivas Nayak
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=1f1b08da1003100919k57d8cc6au6ff753ebf5b6c2f8@mail.gmail.com \
--to=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sinu_nayak2001@yahoo.co.in \
/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
all inboxes | Powered by JetHome®