From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Michal Schmidt <mschmidt@redhat.com>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Jon Masters <jcm@redhat.com>,
Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Subject: Re: [PATCH] kthread: always create the kernel threads with normal priority
Date: Mon, 07 Jan 2008 18:47:59 +0100 [thread overview]
Message-ID: <1199728079.7143.52.camel@twins> (raw)
In-Reply-To: <20080107092956.419b5f91.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
On Mon, 2008-01-07 at 09:29 -0800, Andrew Morton wrote:
> On Mon, 7 Jan 2008 12:09:04 +0100 Ingo Molnar <mingo@elte.hu> wrote:
>
> >
> > > > This causes a practical problem. When a runaway real-time task is
> > > > eating 100% CPU and we attempt to put the CPU offline, sometimes we
> > > > block while waiting for the creation of the highest-priority
> > > > "kstopmachine" thread.
> >
> > sched-devel.git has new mechanisms against runaway RT tasks. There's a
> > new RLIMIT_RTTIME rlimit - if an RT task exceeds that rlimit then it is
> > sent SIGXCPU.
>
> Is that "total RT CPU time" or "elapsed time since last schedule()"?
>
> If the former, it is not useful for this problem.
>
> > there's also a new group scheduling extension that is driven via a
> > sysctl:
> >
> > /proc/sys/kernel/sched_rt_ratio
> >
> > this way if a user has a runaway RT task, other users (and root) will
> > still have some CPU time left. (in Peter's latest patchset that is
> > replaced via rt_runtime_ns - but this is a detail)
>
> Doesn't this make the RT task non-RT? Would need to understand more
> details to tell.
Its an artifact of rt group scheduling. Each group will have to specify
a period and runtime limit therein (and the normalized sum thereof must
not exceed the total time available - otherwise the set is not
schedulable).
So say we have two groups A and B. A has a period of 2 seconds and a
runtime limit of 1, that gives him an avg of 50% cpu time. If B then has
a period of 1 second with a runtime limit of .25s (avg 25%) the total
time required to schedule the realtime groups would be 75% on average.
Without group scheduling everything is considered one group but we still
have the period and runtime limits.
So as long as the realtime cpu usage fits within the given limits it
acts as before. Once it exceeds its limit it will be capped hard - which
is ok, since it exceeded its hard limit, and realtime applications are
supposed to be deterministic and thus be able to tell how much time
they'd require. [ If only this model were true, but its a model
frequently used and quite accepted ]
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-01-07 17:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 22:43 [PATCH] kthread: run kthreadd with max priority SCHED_FIFO Michal Schmidt
2007-12-17 23:00 ` Jon Masters
2007-12-22 9:30 ` Andrew Morton
2007-12-22 9:52 ` Jon Masters
2007-12-22 10:11 ` Andrew Morton
2007-12-22 10:18 ` Jon Masters
2007-12-22 10:39 ` Mike Galbraith
2007-12-22 10:52 ` Andrew Morton
2007-12-22 11:21 ` Jon Masters
2007-12-23 8:50 ` Mike Galbraith
2008-01-07 10:06 ` [PATCH] kthread: always create the kernel threads with normal priority Michal Schmidt
2008-01-07 10:25 ` Andrew Morton
2008-01-07 11:09 ` Ingo Molnar
2008-01-07 17:29 ` Andrew Morton
2008-01-07 17:47 ` Peter Zijlstra [this message]
2008-01-08 9:54 ` Michal Schmidt
2008-01-07 13:18 ` Michal Schmidt
2008-01-08 16:22 ` Ingo Molnar
2008-01-07 11:22 ` Remy Bohmer
2008-01-07 13:10 ` Michal Schmidt
2008-01-07 15:53 ` Remy Bohmer
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=1199728079.7143.52.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mschmidt@redhat.com \
--cc=takeuchi_satoru@jp.fujitsu.com \
/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