linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@arm.com>
To: Daniel Bristot de Oliveira <daolivei@redhat.com>
Cc: linux-kernel@vger.kernel.org, Rik van Riel <riel@redhat.com>,
	"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
	Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups@vger.kernel.org
Subject: Re: [PATCH] cgroup: disable irqs while holding css_set_lock
Date: Tue, 7 Jun 2016 14:30:09 +0100	[thread overview]
Message-ID: <20160607133009.GS9340@e106622-lin> (raw)
In-Reply-To: <bda9f957-6f4b-5b95-f752-1c6a9a26aa79@redhat.com>

On 07/06/16 09:39, Daniel Bristot de Oliveira wrote:
> Ciao Juri,
> 

Ciao, :-)

> On 06/07/2016 07:14 AM, Juri Lelli wrote:
> > Interesting. And your test is using cpuset controller to partion
> > DEADLINE tasks and then modify groups concurrently?
> 
> Yes. I was studying the partitioning/admission control of the
> deadline scheduler, to document it.
> 
> I was using the minimal task from sched deadline's documentation
> as the load (the ./m in the bellow script). 
> 
> Here is the script I was using in the test:

Thanks for sharing it. It is somewhat similar to some of my test
scripts, but I've got a question below.

> -----------%<------------------------------------------------------------
> #!/bin/sh
> 
> # I am running on a 8 cpus box, you need to adjust the
> # cpu mask to match to your cpu topology.
> 
> cd /sys/fs/cgroup/cpuset
> 
> # global settings
> # echo 1 > cpuset.cpu_exclusive
> echo 0 > cpuset.sched_load_balance
> 
> # a cpuset to run ordinary load:
> 
> if [ ! -d ordinary ]; then
> 	mkdir ordinary
> 	echo 0-3 > ordinary/cpuset.cpus
> 	echo 0 > ordinary/cpuset.mems
> 	echo 0 > ordinary/cpuset.cpu_exclusive
> 	# the load balance can be enabled on this cpuset.
> 	echo 1 > ordinary/cpuset.sched_load_balance
> fi
> 
> # move all threads to ordinary cpuset 
> ps -eL -o lwp | while read tid; do
> 	echo $tid >> ordinary/tasks 2> /dev/null || echo "thread $tid is pinned or died"
> done
> 
> echo $$ > ordinary/tasks
> cat /proc/self/cpuset
> ~/m &
> 
> # a single cpu cpuset (partitioned)
> if [ ! -d partitioned ]; then
> 	mkdir partitioned
> 	echo 4 > partitioned/cpuset.cpus
> 	echo 0 > partitioned/cpuset.mems
> 	echo 0 > partitioned/cpuset.cpu_exclusive
> fi
> 
> echo $$ > partitioned/tasks
> cat /proc/self/cpuset
> ~/m &
> 
> # a set of cpus (clustered)
> if [ ! -d clustered ]; then
> 	mkdir clustered
> 	echo 5-7 > clustered/cpuset.cpus
> 	echo 0 > clustered/cpuset.mems
> 	echo 0 > clustered/cpuset.cpu_exclusive

So, this and the partitioned one could actually overlap, since we don't
set cpu_exclusive. Is that right?

I guess affinity mask of both m processes gets set correclty, but I'm
not sure if we are missing one check in the admission control. Can you
actually create two overlapping sets and get DEADLINE tasks running in
them? For example, what happens if partitioned is [4] and clustered is
[4-7]? Does setattr() fail?

It is not really related to this patch, I'm just wondering if there is
another problem lying around.

Thanks,

- Juri

> 	# the load balance can be enabled on this cpuset.
> 	echo 1 > clustered/cpuset.sched_load_balance
> fi
> 
> echo $$ > clustered/tasks
> cat /proc/self/cpuset
> ~/m
> ----------->%------------------------------------------------------------
> 
> The problem rarely reproduces.
> 
> -- Daniel
> 

  reply	other threads:[~2016-06-07 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 22:24 [PATCH] cgroup: disable irqs while holding css_set_lock Daniel Bristot de Oliveira
2016-06-07 10:14 ` Juri Lelli
2016-06-07 12:39   ` Daniel Bristot de Oliveira
2016-06-07 13:30     ` Juri Lelli [this message]
2016-06-07 15:26       ` Daniel Bristot de Oliveira
2016-06-07 16:11         ` Juri Lelli
2016-06-07 15:13 ` Daniel Bristot de Oliveira

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=20160607133009.GS9340@e106622-lin \
    --to=juri.lelli@arm.com \
    --cc=cgroups@vger.kernel.org \
    --cc=daolivei@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=riel@redhat.com \
    --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).