setitimer shows different between amd64 and ia32

Adam Lee adam8157 at gmail.com
Mon Jul 25 02:51:21 EDT 2011


On Sun, Jul 24, 2011 at 09:09:55PM -0700, Dave Hylands wrote:
> Hi Adam,
> 
> On Sun, Jul 24, 2011 at 8:10 PM, Adam Lee <adam8157 at gmail.com> wrote:
> > Hi, all
> >
> > I'm working on a test which invoking setitimer(), and it hang in
> > ia32 and ppc, but passed in amd64, could you guys give some help?
> >
> > 1, I know the 'value.it_interval.tv_usec' is too short, but why amd64
> > passed?
> >
> > 2, If I switch clock source from "tsc" to "hpet" on ia32, it passed.
> >
> > 3, I compiled it in ia32 and run it with ia32-libs in amd64, it passed.
> 
> I ran it on my 64-bit machine and it hung because the interval was so
> short that it generated a continuous stream of signals.
> 
> Each signal took longer to process than the interval of the timer.
> 
> I added some memset's (since stack variables are uninitialized, and
> stuff like sact will get some random values in it if you don't).
> 
> I changed the interval of the timer to be 1000 usec, and changed
> LOOP_LIMIT to be 1E6, and I got the catcher to be called multiple
> times.
> 

Thank you all, I tried it again.

Xeoc E5502, RHEL 6.1:
tsc: just exit without any warning
hpet: hang

Xeon X7550, RHEL 5.7:
tsc & hpet: "The signal catcher never gained control" 

I'm confused, maybe the result due to the processor?

-- 
Regards,
Adam Lee
--------------------------------------------------
E-mail: adam8157 at gmail.com
Website: http://www.adam8157.info
--------------------------------------------------



More information about the Kernelnewbies mailing list