From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhylands@gmail.com (Dave Hylands) Date: Sun, 24 Jul 2011 21:09:55 -0700 Subject: setitimer shows different between amd64 and ia32 In-Reply-To: <20110725031038.GA11399@adam-laptop> References: <20110725031038.GA11399@adam-laptop> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Adam, On Sun, Jul 24, 2011 at 8:10 PM, Adam Lee 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. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com