From: Con Kolivas <kernel@kolivas.org>
To: Stephen Warren <SWarren@nvidia.com>
Cc: Con Kolivas <kernel@kolivas.org>, linux-kernel@vger.kernel.org
Subject: Re: SCHED_RR and kernel threads
Date: Tue, 09 Nov 2004 12:08:26 +1100 [thread overview]
Message-ID: <cone.1099962506.38730.13436.502@pc.kolivas.org> (raw)
In-Reply-To: <DBFABB80F7FD3143A911F9E6CFD477B002A7F0CE@hqemmail02.nvidia.com>
Stephen Warren writes:
>> From: Con Kolivas [mailto:kernel@kolivas.org]
>> Stephen Warren wrote:
>> > It appears that during times of high application CPU usage, some
>> > *kernel* threads don't get to run.
>> > ...
>> > This appears to be due to the fact that the kernel threads are all
>> > SCHED_OTHER, so our SCHED_RR user-space application trumps them!
>>
>> Don't run your userspace at SCHED_RR? The kernel threads are
>> SCHED_NORMAL precisely for the reason that you wont get real time
>> performance if the kernel threads rear their ugly heads,
>> albeit rarely.
>
> We have actually set the kernel threads to priority SCHED_RR 50, and
> most user-space threads to SCHED_RR priority 50. Some critical
> user-space threads are above priority 50.
>
> Won't this allow the kernel and user space threads to co-operate nicely
> all the time?
>
> What is it specifically that will make kernel SCHED_RR threads cause
> non-real-time operation? If it's just a bunch of corner cases or odd
> conditions, we may be in an environment we can control so that doesn't
> happen...
>
> I guess we could have most threads stay at SCHED_NORMAL, and just make
> the few critical threads SCHED_RR, but I'm getting a lot of push-back on
> this, since it makes our thread API a lot more complex.
Your workaround is not suitable for the kernel at large. Preventing
starvation of the system if you are using SCHED_RR threads is up to your
userspace apps to provide. SCHED_RR is _not_ designed to use 100% of the cpu
all the time, but to provide minimum latency preempting everything lower
priority than itself when scheduled. The kernel threads do not need that
sort of control and can potentially starve critical userspace threads during
heavy system stress.
Cheers,
Con
next prev parent reply other threads:[~2004-11-09 1:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 20:50 Stephen Warren
2004-11-09 1:08 ` Con Kolivas [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-09 1:56 Stephen Warren
2004-11-09 2:22 ` Con Kolivas
2004-11-10 19:28 ` Bill Davidsen
2004-11-10 20:40 ` Con Kolivas
2004-11-08 18:30 Stephen Warren
2004-11-08 20:29 ` Con Kolivas
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=cone.1099962506.38730.13436.502@pc.kolivas.org \
--to=kernel@kolivas.org \
--cc=SWarren@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®