Hello Daniel,
thanks for sharing your experience.
On 02/18/2011 02:43 PM, Daniel Poelzleithner wrote:
On 02/17/2011 09:40 PM, Olivier Guilyardi wrote:
I have written a dynamic system optimizer for linux called ulatencyd. I
stumbled more by accident over rt issues my self. I use dynamic cgroups
to adjust the resources of the system to what heuristic rules think the
user expects. At least in the default desktop configuration but you can
actually optimise every system to every load.
I assume it's here:
https://github.com/poelzi/ulatencyd/
Now, what you can do if you have no trust in processes
at all is, to
create dynamic cgroups with carefully calculated cpu.rt_runtime_us
values for the processes. If you have trusted processes, you may give
them seperate cgroups with fixed runtimes, like for example your mixer
process. But remember: you can't overcommit rt_runetime_us and they will
not borrow their rt if they don't use it.
The dynamic cgroups solution seems good.
On Android there basically is one priviledged and trusted audio process,
audioflinger, the sound server, which performs mixing and access the hardware.
All audio clients are untrusted. I think there is a need to both assign a
careful cpu.rt_runtime_us to each client but also to limit the number of clients
which can run at the same time. This would allow to keep the CPU time assigned
to all clients within a certain quota, but also to prevent clients from fighting
with each other for realtime bandwidth.
Can you limit the maximum number of realtime processes with ulatencyd?
--
Olivier