public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: el es <el.es.cr@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: The uncatchable jitter, or may the scheduler wars be over?
Date: Fri, 5 Oct 2012 12:04:29 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121005T132825-464@post.gmane.org> (raw)

Hello,

first of all, the posts that inspired me to write this up,
were from Uwaysi Bin Kareem (paradoxuncreated dot com).

Here is what I think:
could the source of graphic/video jitter as most people 
perceive it, be something that could be technically defined 
as 'graphic buffer underrun', caused by the scheduler 
unable to align the deadline for some userspace programs
that are crucial to video/opengl output v-refresh, that 
being really HARD RT ? As in, say the scheduler could 
sometimes decide to preempt the userspace in the middle of
OpenGL/fb call [pretty easy to imagine this : userspace that
often blocks on calls to the video hardware, or has a
usespace thread that does that, and is unable to finish
some opengl pipeline calls before end of its slice, or
in case of misalignment, can execute enough commands to
create one (or several) frame(s), and then is cut in the 
middle of creating another one and has to wait for its 
turn again, and in the mean time, vsync/video buffer swap 
occurs, and that last frame is lost/discarded/created with
time settings from previous slice which are wrong]

Bearing in mind, that the most length the video/fb/opengl
buffer can have, is probably 3 (triple buffering as in 
some game settings), as opposed to (at least some) 
sound hw which can have buffers several ms long,
it's not hard to imagine what happens if userspace cannot
make it in time to update the buffer, causing 'underruns'.

This would also explain why it doesn't matter to 'server'
people - they don't have RT video hw/buffers they care for...
(but they tune the below for max throughput instead)

But whether it is measurable or not - I don't know.

The OP (Uwaysi) has been fiddling with HZ value and the
averaging period of the scheduler (which he called 'filter')
(and granularity too). He's had some interesting results IMO.

Hope the above makes sense and not much gibberish :)

Lukasz


             reply	other threads:[~2012-10-05 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 12:04 el es [this message]
2012-11-04 14:04 ` The uncatchable jitter, or may the scheduler wars be over? Uwaysi Bin Kareem
2012-11-04 17:03   ` Lukasz Sokol
2012-11-05  8:34     ` Ove Karlsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20121005T132825-464@post.gmane.org \
    --to=el.es.cr@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox