mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrei Voropaev <avorop@mail.ru>
To: Michael Kerrisk <mtk-lkml@gmx.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: with 2.6.7 setitimer called in sequence returns strange values on i686
Date: Wed, 25 Aug 2004 09:17:37 +0200	[thread overview]
Message-ID: <20040825071737.GB5653@avorop.local> (raw)
In-Reply-To: <21011.1093360296@www48.gmx.net>

On Tue, Aug 24, 2004 at 05:11:36PM +0200, Michael Kerrisk wrote:
> Hello Andrei,
> 
> > Sorry if I'm taking your time away but to me it looks like I have kernel
> > problem, so I hoped to find some help in this list. I'm not subscribed
> > so please CC me on replies.
> > 
> > I'm using setitimer(ITIMER_REAL...) to measure time intervals.
> > Everything was working fine untill I've installed 2.6.7 kernel. 
> > 
> > bash$ uname -a
> > Linux avorop 2.6.7 #5 Thu Aug 19 11:53:33 CEST 2004 i686 unknown
> > 
> > Here's little piece of code that reproduces problem on my machine.
> 
> There's a little problem with your code.  You're not
> displaying microseconds correctly.  That "10.479" below should really 
> be "10.000479".  I suspect that that sort of small rounding error 
> (smaller than HZ) is probably acceptable, but someone else might 
> have some input on this point.
> 
> Cheers,
> 
> Michael
> 
> PS The use of pthreads in this program has no relevance to the 
> behaviour you are seeing -- I removed the pthread stuff and saw 
> the same results.

Yep. You are right. I just had some old testing program that I used with
2.4.21 and there I wanted to make sure that things work in pthread. So I
just reused it without removing pthread stuff.

This "small rounding error" crashes my application pretty nice. Because
my application assumes that when I call setitimer second time, then the
timer will be either the same or smaller, not bigger. And definetely no
man page mentions this sudden growth. Quite opposit, man page says that
the value is decremented.

At least now I know that it's reproduceble on other machines.

Andrei

  reply	other threads:[~2004-08-25  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 14:42 Andrei Voropaev
2004-08-24 15:11 ` Michael Kerrisk
2004-08-25  7:17   ` Andrei Voropaev [this message]
2004-08-30 12:10 ` Andrei Voropaev

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=20040825071737.GB5653@avorop.local \
    --to=avorop@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-lkml@gmx.net \
    /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®