linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <raistlin@linux.it>
To: Colin Cross <ccross@android.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH] sched/rt: fix SCHED_RR across cgroups
Date: Sat, 19 May 2012 15:11:02 +0200	[thread overview]
Message-ID: <1337433062.7075.9.camel@Abyss> (raw)
In-Reply-To: <CAMbhsRRnweLW_J+aBUsSbBh_Rp-PzVFap1FaRV1t9G0o9fZZAw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]

On Fri, 2012-05-18 at 17:13 -0700, Colin Cross wrote: 
> Even with this patch, scheduling of SCHED_RR tasks in cgroups is a
> little odd.  Each cgroup is treated as a schedulable entity alongside
> the tasks in the same parent cgroup, and then the tasks inside the
> child cgroup round robin through the child cgroup's time slices.  So
> in the setup:
> root_cgroup
>    task 1
>    cgroup
>       task 2
>       task 3
> 
> The RR will be:
> task 1, cgroup(task 2), task 1, cgroup(task 3), ...
> 
> task 1 will run twice as often, for a full RR_TIMESLICE each time, as
> tasks 2 and 3.
> 
That looks right to me...

> Is that the way SCHED_RR is intended to interact with cgroups?
>
I would say it is. That's what you get because of putting task1 and
cgroup at the same level in the "hierarchy". I'm curious, what kind of
behaviour were you expecting?

Of course, the actual schedule also depends on the real-time priority of
the various tasks (groups don't have a priority, they inherit it from
their tasks, or at least it was like this when I used to work with
it :-P), but I guess you're putting all the tasks in the same queue
(i.e., same rt-prio), is it that the case?

Dario

> --
> 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/
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-05-19 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17  4:34 [PATCH] sched/rt: fix SCHED_RR across cgroups Colin Cross
2012-05-18  8:56 ` Peter Zijlstra
2012-05-18 17:52   ` Colin Cross
2012-05-18 18:37     ` Peter Zijlstra
2012-05-19  0:13       ` Colin Cross
2012-05-19 13:11         ` Dario Faggioli [this message]
2012-05-19 20:37           ` Colin Cross
2012-05-23 13:32             ` Dario Faggioli
2012-05-25 11:52               ` Peter Zijlstra
2012-05-25 13:12                 ` Steven Rostedt
2012-05-25 17:55                   ` Paul E. McKenney
2012-05-30 13:40 ` [tip:sched/urgent] sched/rt: Fix " tip-bot for Colin Cross

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=1337433062.7075.9.camel@Abyss \
    --to=raistlin@linux.it \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ccross@android.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).