public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* tvtime and the Linux 2.6 scheduler
@ 2004-05-23 15:48 Billy Biggs
  2004-05-23 16:20 ` Jose Luis Domingo Lopez
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Billy Biggs @ 2004-05-23 15:48 UTC (permalink / raw)
  To: Kernel Mailing List

  I am the author of tvtime, a TV application with advanced image
processing algorithms.  Some users are complaining about poor
performance under Linux 2.6, and I would like more information about how
tvtime will be treated by the scheduler.  Here is an example of the
intended usage:

  - Program running as root and SCHED_FIFO
  - NTSC, input ~30 fps, each field processed for an output of ~60 fps
  - CPU intensive processing, say 9 ms per field on my P3-733
  - with a typical AGP card, the X driver takes 4 ms to draw
  - Wait using /dev/rtc set to 1024 Hz

  for(;;)
      9 ms : process frame
      4 ms : draw frame
      3 ms : wait until next field time using /dev/rtc
      9 ms : process frame
      4 ms : draw frame
      3 ms : block on /dev/video0 for next frame
     -----
     33 ms : time per NTSC frame

  The theory is that Linux classifies this as a CPU hog regardless of
its priority, and preempts tvtime with other processes.  Oswald
Buddenhagen describes the effect as this:

  "[...] it starts up fine, but after a few seconds (when the scheduler
gathered some stats) ... well, it looks funny: the scene goes roughly
exponentially into slow motion, then there is a frame drop and the
process starts over.  this behaviour can be observed at any priority,
which is clearly against the claim "no normally priorized interactive
process will preempt a highly priorized cpu-hog" that i've read
somewhere.  the xserver priority does not change anything, either;"

  Avoiding root/SCHED_FIFO and using usleep() instead of /dev/rtc seems
to exhibit the same behavior.

  Thoughts?

  -Billy


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-05-27 11:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 15:48 tvtime and the Linux 2.6 scheduler Billy Biggs
2004-05-23 16:20 ` Jose Luis Domingo Lopez
2004-05-23 16:54 ` Con Kolivas
2004-05-23 17:20   ` Billy Biggs
2004-05-23 21:03   ` Oswald Buddenhagen
2004-05-24  8:43   ` Ingo Molnar
2004-05-24  6:58     ` Nick Piggin
2004-05-24  9:12       ` Ingo Molnar
2004-05-24  7:14         ` Nick Piggin
2004-05-24  9:34         ` Ingo Molnar
2004-05-23 22:49 ` szonyi calin
2004-05-24 19:38   ` Bill Davidsen
2004-05-25  8:49     ` Tobias Diedrich
2004-05-24  9:20 ` Ingo Molnar
2004-05-24 11:45   ` Oswald Buddenhagen
2004-05-27 11:35 ` Redeeman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox