lkml.org 
[lkml]   [2005]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature
From
Date
Nick Piggin <nickpiggin@yahoo.com.au> writes:

> I'm a bit concerned about this kind of policy and breakage of
> userspace APIs going into the kernel. I mean, if an app is
> succeeds in gaining SCHED_FIFO / SCHED_RR scheduling, and the
> scheduler does something else, that could be undesirable in some
> situations.

True. It's similar to running out of CPU bandwidth, but not quite.

AFAICT, the new behavior still meets the letter of the standard[1].
Whether it meets the spirit of the standard is debatable. My own
feeling is that it probably does, and that making SCHED_FIFO somewhat
less powerful but much easier to access is a reasonable tradeoff.

[1] http://www.opengroup.org/onlinepubs/007908799/xsh/realtime.html

If I understand Ingo's proposal correctly, setting RLIMIT_RT_CPU to
zero and then requesting SCHED_FIFO (with CAP_SYS_NICE) yields exactly
the former behavior. This will probably be the default setting.

> Secondly, I think we should agree upon and get the basic rlimit
> support in ASAP, so the userspace aspect can be firmed up a bit
> for people like Paul and Jack (this wouldn't preclude further
> work from happening in the scheduler afterwards).

I don't sense much opposition to adding rlimit support for realtime
scheduling. I personally don't think it a very good way to manage
this problem. But, it certainly can be made to work.

The main point of discussion is: exactly what resource should it
limit? Arjan and Chris proposed to limit priority. Ingo proposed to
limit the percentage of each CPU available for realtime threads
(collectively). Either would meet our minimum needs (AFAICT).

But, they are not identical, and the best choice depends at least
partly on the outcome of Ingo's scheduler experiments. I doubt that
anyone wants to add both (though it could come down to that, I
suppose).

> And finally, with rlimit support, is there any reason why lockup
> detection and correction can't go into userspace? Even RT
> throttling could probably be done in a userspace daemon.

It can. But, doing it in the kernel is more efficient, and probably
more reliable.
--
joq
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.194 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site