Re: [PATCH] [request for inclusion] Realtime LSM

Matt Mackall
2005-01-13T06:36:28Z

On Wed, Jan 12, 2005 at 11:44:34PM -0600, Jack O'Quin wrote:
>
> One major problem: this `nice --20' hack affects every thread, not
> just the critical realtime ones. That's not what we want. Audio
> applications make very conscious choices which threads run with high
> priority and which do not.

I don't think it was intended as a final solution but rather as a
feasibility experiment.

> Plus, we maintain JACK for several platforms including GNU/Linux,
> FreeBSD, and Mac OS X. IRIX support is planned soon, possibly Solaris
> some day. I would really prefer for Linux to support genuine POSIX
> realtime with SCHED_FIFO scheduling. Since that is our primary
> development platform, it makes our code a lot more portable.

Good realtime support is looking like a certainty at this point,
though it may take a while for all the bits to be fully merged.

> And, this is not just about JACK. We could change to call nice()
> instead of pthread_setschedparam() on Linux, but that about all the
> other audio applications? I don't think this is a reasonable thing to
> ask of people. It would take a year just to get them all changed,
> like herding cats.

If we can get high priority SCHED_OTHER working sufficiently well,
that will be preferable in the long run as the security implications
are slightly less dire. It's already been noted that it doesn't solve
your privilege problem, but it's still interesting to us because it
has potential to address the deadlock issue.

Doesn't mean you have to use it (though you'll probably want to give
your users the option).

> This whole approach seems like a "dry well" to me.

It may turn out to be. Please continue testing it though - you've got
a good test case handy.

> Tomorrow, I'll try the test again after making a new kernel with
> STARVATION_LIMIT set to zero.
>
> Anything else I should try?

Testing feedback on the bits from Ingo that have gone to -mm will
probably help speed their acceptance in mainline.

--
Mathematics is the supreme nostalgia of our time.