lkml.org 
[lkml]   [2001]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: No 100 HZ timer !
Mikulas Patocka wrote:
> Timers more precise than 100HZ aren't probably needed - as MIN_RTO is 0.2s
> and MIN_DELACK is 0.04s, TCP would hardly benefit from them.

Indeed, using precise timers for TCP would probably degrade performance
-- you should process a group of timer events together, when resolution
is not that important.

There are plenty of apps that need higher resolution. Software modem
comes to mind (guess why ;), though the device driver supplies the high
resolution timed interrupts in that case.

Games would like to be able to page flip at vertical refresh time --
<1ms accuracy please. Network traffic shaping benefits from better than
1ms timing. Video players want to display their frames preferably
without 10ms jitter.

Even that old classic game "snake" benefits from decent timing. I
worked on an X multiplayer snake implementation which was very
unpleasant and jerky at first. 1. Disable nagle for X connection :-)
Better but still jerky. 2. Write delay loop like this:

calculate next_event_time
select (0, 0, 0, next_event_time - 20ms)
while (gettimeofday() < next_event_time)
/* Busy loop for last 20ms. */

It's no coincidence that I've had to write another very similar event
loop recently. You can see, this sort of thing is a real waste of CPU.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.171 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site