linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Juri Lelli <juri.lelli@redhat.com>,
	peterz@infradead.org, mingo@redhat.com, tj@kernel.org
Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org,
	luca.abeni@santannapisa.it, lizefan@huawei.com,
	longman@redhat.com, cgroups@vger.kernel.org
Subject: Re: [PATCH v2] sched/core: Fix cpu controller for !RT_GROUP_SCHED
Date: Fri, 19 Jul 2019 10:18:28 +0200	[thread overview]
Message-ID: <f9372197-0282-1ed8-fa0b-a2b4a723a439@redhat.com> (raw)
In-Reply-To: <20190719063455.27328-1-juri.lelli@redhat.com>

On 19/07/2019 08:34, Juri Lelli wrote:
> On !CONFIG_RT_GROUP_SCHED configurations it is currently not possible to
> move RT tasks between cgroups to which cpu controller has been attached;
> but it is oddly possible to first move tasks around and then make them
> RT (setschedule to FIFO/RR).
> 
> E.g.:
> 
>   # mkdir /sys/fs/cgroup/cpu,cpuacct/group1
>   # chrt -fp 10 $$
>   # echo $$ > /sys/fs/cgroup/cpu,cpuacct/group1/tasks
>   bash: echo: write error: Invalid argument
>   # chrt -op 0 $$
>   # echo $$ > /sys/fs/cgroup/cpu,cpuacct/group1/tasks
>   # chrt -fp 10 $$
>   # cat /sys/fs/cgroup/cpu,cpuacct/group1/tasks
>   2345
>   2598
>   # chrt -p 2345
>   pid 2345's current scheduling policy: SCHED_FIFO
>   pid 2345's current scheduling priority: 10
> 
> Also, as Michal noted, it is currently not possible to enable cpu
> controller on unified hierarchy with !CONFIG_RT_GROUP_SCHED (if there
> are any kernel RT threads in root cgroup, they can't be migrated to the
> newly created cpu controller's root in cgroup_update_dfl_csses()).
> 
> Existing code comes with a comment saying the "we don't support RT-tasks
> being in separate groups". Such comment is however stale and belongs to
> pre-RT_GROUP_SCHED times. Also, it doesn't make much sense for
> !RT_GROUP_ SCHED configurations, since checks related to RT bandwidth
> are not performed at all in these cases.
> 
> Make moving RT tasks between cpu controller groups viable by removing
> special case check for RT (and DEADLINE) tasks.
> 
> Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
> Reviewed-by: Michal Koutný <mkoutny@suse.com>

Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>

Thanks!
-- Daniel

  reply	other threads:[~2019-07-19  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  6:34 [PATCH v2] sched/core: Fix cpu controller for !RT_GROUP_SCHED Juri Lelli
2019-07-19  8:18 ` Daniel Bristot de Oliveira [this message]
2019-07-23 12:44 ` Peter Zijlstra
2019-07-25 16:25 ` [tip:sched/core] sched/core: Fix CPU " tip-bot for Juri Lelli

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=f9372197-0282-1ed8-fa0b-a2b4a723a439@redhat.com \
    --to=bristot@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=longman@redhat.com \
    --cc=luca.abeni@santannapisa.it \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).