I dont think mp3 playing should require realtime priority. if the problem is
not getting enough cpu time or attention from the kernel then it's a kernel
scheduling problem. You shouldn't have to "cheat" and bypass all that. in
an ideal situation the kernel should be able to see that the mp3 proccess is
running and is thus more important than stuff like dbench proccesses.
Although this problem we're having with mp3 skippage is not a cpu bound
problem. We're dealing with another resource here that's not so predictable
because the kernel scheduling handles cpu time slices very nicely.
> b) several processes are doing disk operations simultaneously.
> This will put preassure on the VM to free pages fast enough. It will
> also put preassure on the disk IO to read from disk fast enough -
> these requests are not prioritized with the process priority in mind.
> If there are no pages free we have to wait...
> [if you run the latencytest program with no audiofile, to use a sine,
> you will not hear dropouts... it runs with RT prio with resident memory]
this may be the reason. Although i dont think RT prio has anything to do
with it. If RT prio doesn't effect this VM portion of the kernel then wether
we use RT or not for something as tiny as mp3 playing would hardly matter.
Our sound drivers may not be able to play nicely with the VM under heavy disk
access like cdparanoia -Z or dbench 32 and above.
> This second problem is MUCH harder to solve.
> Multimedia applications could reserve memory - for their critical code
> including buffers... (but this will require suid helpers...)
> SGIs filesystem XFS is said to be able to guarantee bandwith to an
> application.
>
> Riels schedule in __alloc_pages probably helps the case with competing
> regular processes a lot. Not allowing memory allocators to run their
> whole time slot. The result should be a way to prioritize memory allocs
> relative your priority. (yield part might be possible/good to remove)
Sounds interesting.
> /RogerL
Setting to RT should guarantee that your process gets executed when it wants
to and processed by the kernel, which should help when dealing with something
that holds on to a part of the kernel for an unpredictable amount of time or
perhaps just a length of time that's too long. But this vm scheduling thing
that can break up those requests should allow the kernel to organize more of
it's processes to be able to run smoothly at the same time without the need
to give one higher priority than the other. Perhaps making a default alloc
time slot that's small so no processes get accidentally starved and if you
want a program that hogs memory time to run at full performance and not be
hampered by multitasking, running at a higher priority would increase it's
mem alloc time. mp3 playing requires a very minimal amount of resources
from anything. it should be made that these minimal programs can run
smoothly without resource hogging programs starving them unless you
specificaly want them to (ie. increase priority).
-
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/