setitimer() odd timing

From: Ian FREISLICH <ianf_at_clue.co.za>
Date: Thu, 01 Nov 2007 15:38:11 +0200
Hi

I've got a issue that I noticed recently.  When I set an alarm()
or use setitimer() the signal delivery is delayed somewhat.  I'm
not sure if it's that the signal is delayed or if it's just that
the timer runs slowly.  I am using ITIMER_REAL.

It's pretty linear over 1 to 60 (asked for) seconds translating
them into 3.7 real seconds:

[apple] ~ # time sleep 5

real    0m18.542s
user    0m0.000s
sys     0m0.001s
[apple] ~ # time sleep 10

real    0m37.081s
user    0m0.000s
sys     0m0.001s
[apple] ~ # time sleep 60

real    3m42.468s
user    0m0.000s
sys     0m0.001s

The hardware in question is an Apple MacBook Pro.  FWIW, I don't
notice this on other i386 based hardware that I have.  It affects
things like ping, cron, atrun and xclock but not gettimeofday().

I'm not sure where to start looking.  If someone points me at what
needs instrumenting, I'll see if I can narrow the problem space.

Ian

--
Ian Freislich
Received on Thu Nov 01 2007 - 16:11:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:20 UTC