RE: 2.6.11 timeval_to_jiffies() wrong for ms resolution timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awefully sorry about the line-breaks (or absence thereof!)

Stupid Outlook that corporate IT forces us to use!

And I meant 20 ms, not 20 us, of course...

- Bhavesh

Bhavesh P. Davda | Distinguished Member of Technical Staff | Avaya |
1300 West 120th Avenue | B3-B03 | Westminster, CO 80234, U.S.A. |
Voice/Fax: (303) 538-4438 | [email protected]

 

> -----Original Message-----
> From: Davda, Bhavesh P (Bhavesh) 
> Sent: Wednesday, May 25, 2005 1:07 PM
> To: 'Chris Friesen'; '[email protected]'
> Cc: '[email protected]'
> Subject: RE: 2.6.11 timeval_to_jiffies() wrong for ms 
> resolution timers
> 
> > -----Original Message-----
> > From: Chris Friesen [mailto:[email protected]] 
> > Sent: Wednesday, May 25, 2005 12:08 PM
> > To: [email protected]
> > Cc: Davda, Bhavesh P (Bhavesh); [email protected]
> > Subject: Re: 2.6.11 timeval_to_jiffies() wrong for ms 
> > resolution timers
> > 
> > George Anzinger wrote:
> > > Chris Friesen wrote:
> > 
> > >> What about telling it to wake up a jiffy earlier, then checking 
> > >> whether the scheduling lag was enough to cause it to have 
> > waited the 
> > >> full specified time.  If not, put it to sleep for another jiffy.
> > 
> > > The user is, of course, free to do what ever they would like.  
> > 
> > I actually meant doing this in the kernel.
> 
> Ditto.
> 
> > 
> >  > For a
> > > more complete solution you might be interested in HRT (High Res 
> > > Timers).  See my signature below.
> > 
> > Yep.  One more patch to apply and worry about versions and 
> > maintenance. 
> >   Not enough of a demand for us to be able to use it, at 
> > least at this 
> > point.
> > 
> > Chris
> 
> Ditto ditto :)
> 
> BTW, this reminds me an aweful lot of TH2GT2G, and Deep 
> Thought taking 7.5 million years to come up with the answer "42!"
> 
> Me: Hey Deep Thought! What's 20 us converted into jiffies?
> 
> Deep Thought: Let's see: after accounting for all kinds of 
> underflow and overflow possibilities, and extending the 
> operands to 64-bit to retain the best precision, and 
> crunching through a few complex macros, the answer you're 
> looking for is... Is... Is... "21!" The real problem is: You 
> didn't ask me the right question. You should have asked me 
> "What's 19 us converted into jiffies?"
> 
> On a more serious note: what is a real-time (read 
> SCHED_FIFO/SCHED_RR) task to use to get millisecond accuracy 
> wakeup timing services from the kernel? i.e. what are the 
> alternatives to setitimer() that wake up the task exactly at 
> the interval that is requested of it? You mention high-res 
> timers as a possibility, but in the form of a patch. What's 
> available in mainline unpatched?
> 
> Thanks
> 
> - Bhavesh
> 
> 
> 
> Bhavesh P. Davda | Distinguished Member of Technical Staff | Avaya |
> 1300 West 120th Avenue | B3-B03 | Westminster, CO 80234, U.S.A. |
> Voice/Fax: (303) 538-4438 | [email protected] 
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux