From: Peter Zijlstra <peterz@infradead.org>
To: Jussi Laako <jussi@sonarnerd.net>
Cc: James Courtier-Dutton <James@superbug.co.uk>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC][PATCH] Multimedia scheduling class
Date: Mon, 26 Jan 2009 08:25:45 +0100 [thread overview]
Message-ID: <1232954745.4863.4.camel@laptop> (raw)
In-Reply-To: <497CF128.2060903@sonarnerd.net>
On Mon, 2009-01-26 at 01:09 +0200, Jussi Laako wrote:
> James Courtier-Dutton wrote:
> >> For sure this is nice for certain tasks. I'm not entirely convinced if
> >> the average media player or Flash-plugin would or should start using these.
> >
> > There is never a need for media players to use this.
> > Media players have time stamps on the displayed frames.
> > If the timestamp on a frame indicates it has taken too long to decode
> > it, the media player just skips the frame until it reaches frames that
> > have non-expired time stamps. No need for any kernel help here.
>
> This is completely irrelevant. These media players still play audio and
> sync video to audio. Many of these players are not programmed in a way
> that it would be safe to run these on SCHED_FIFO. Or the environment
> these are running in is not safe enough. But still smooth video and
> audio playback is needed, even in cases when locate database is being
> rebuilt in the background and possibly other CPU and IO intensive tasks
> are running. Any skipped frames make the video playback look jumpy, if
> frames are lost, it should be single frame periodically, not burst of
> frames at once...
>
> Good everyday normal example is HD video played from Youtube or similar
> site using Flash plugin inside browser. There can be various background
> tasks running at the same time, but the video playback should still be
> smooth. One may want to run thread doing video decoding at significantly
> lower priority than audio decoding thread in order to maintain overall
> system responsiveness in cases of high CPU load from the video decoding
> part. While the audio thread shouldn't starve or miss it's deadline.
Right, and I think the solution to this problem is twofold, 1)
application writers should start writing (soft) realtime applications if
they want (soft) realtime behaviour -- there's just no way around that.
And 2), the kernel can help by providing a deadline based scheduler,
which should make the above easier and less likely to mess up the rest
of the system. ie. a deadline scheduled application will not exceed its
allotted budget, unlike a FIFO scheduled app.
next prev parent reply other threads:[~2009-01-26 7:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 18:40 [RFC][PATCH] Multimedia scheduling class Jussi Laako
2008-12-30 7:42 ` Peter Zijlstra
2008-12-30 8:39 ` Jussi Laako
2009-01-12 9:55 ` Jussi Laako
2009-01-12 10:28 ` Peter Zijlstra
2009-01-13 9:44 ` Jussi Laako
2009-01-17 12:49 ` James Courtier-Dutton
2009-01-25 23:09 ` Jussi Laako
2009-01-26 7:25 ` Peter Zijlstra [this message]
2009-05-11 8:22 ` [RFC][PATCH] Multimedia scheduling class, take 2 Jussi Laako
2009-05-12 5:38 ` Artem Bityutskiy
2009-05-12 5:57 ` Peter Zijlstra
2009-05-12 9:53 ` Jussi Laako
2009-05-12 15:32 ` Chris Friesen
2009-05-12 16:34 ` Jussi Laako
2009-05-12 16:45 ` Raistlin
2009-05-12 17:38 ` Jussi Laako
2009-05-12 17:55 ` Jussi Laako
2009-05-12 17:00 ` Chris Friesen
2009-05-12 17:53 ` Jussi Laako
2009-05-12 23:04 ` Chris Friesen
2009-05-13 6:36 ` Jussi Laako
2009-05-12 10:07 ` Jussi Laako
2009-05-12 11:19 ` Peter Zijlstra
2009-05-12 12:12 ` Jussi Laako
2009-05-12 9:40 ` Henrik Austad
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=1232954745.4863.4.camel@laptop \
--to=peterz@infradead.org \
--cc=James@superbug.co.uk \
--cc=jussi@sonarnerd.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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