[parisc-linux] [PATCH] timer_interrupt and gettimeoffset.

John David Anglin dave at hiauly1.hia.nrc.ca
Tue Sep 5 18:24:00 MDT 2006


> >  Integer division and multiplation are very expensive, particularly when
> > running in 64-bit mode.  We don't have optimized millicode to do it.
> > So, I don't much like falling into the unlikely case if we are just
> > delayed one tick.
> 
> How many loops would be a reasonable tradeoff? 5? 10?
> We'd need a histogram from a "slow" machine to see that tradeoff.

The decision to loop versus division/multiplication can be made
based on the average number of cycles needed for the former versus
the latter.  If now - next_tick is less than nticks, then loop.
I'm sure the average number of cycles for division/multiplication
depends on whether the code is 32 bits or 64 bits.  Take a look
at __divdi3 if you want to see how horrible integer division is.

Dave
-- 
J. David Anglin                                  dave.anglin at nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the parisc-linux mailing list