linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Luca Abeni <luca.abeni@santannapisa.it>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	tj@kernel.org, vbabka@suse.cz, Li Zefan <lizefan@huawei.com>,
	akpm@linux-foundation.org, weiyongjun1@huawei.com,
	Juri Lelli <juri.lelli@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Claudio Scordino <claudio@evidence.eu.com>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
Subject: Re: [PATCH 0/7] sched/deadline: fix cpusets bandwidth accounting
Date: Fri, 25 Aug 2017 13:53:39 -0600	[thread overview]
Message-ID: <CANLsYkxSvJuX+DJqRCButY--VCMfb+XHRN-3wzQkbxHHNrpg4g@mail.gmail.com> (raw)
In-Reply-To: <20170825115209.44a6b042@luca>

On 25 August 2017 at 03:52, Luca Abeni <luca.abeni@santannapisa.it> wrote:
> On Fri, 25 Aug 2017 08:02:43 +0200
> luca abeni <luca.abeni@santannapisa.it> wrote:
> [...]
>> > The above demonstrate that even if we have two CPUsets new task belong
>> > to the "default" CPUset and as such can use all the available CPUs.
>>
>> I still have a doubt (probably showing all my ignorance about
>> CPUsets :)... In this situation, we have 3 CPUsets: "default",
>> set1, and set2... Is everyone of these CPUsets associated to a
>> root domain (so, we have 3 root domains)? Or only set1 and set2 are
>> associated to a root domain?
>
> Ok, after reading (and hopefully understanding better :) the code, I
> think this question was kind of silly... There are only 2 root domains,
> corresponding to set1 and set2 (right?).

Correct - although there is a default CPUset there isn't a default root domain.

>
> [...]
>
>> > So above we'd run the acceptance test on root
>> > domain A and B before promoting the task.  Of course we'd also have to
>> > add the utilisation of that task to both root domain.  Although simple
>> > it goes at the core of the DL scheduler and touches pretty much every
>> > aspect of it, something I'm reluctant to embark on.
>>
>> I see... So, the "default" CPUset does not have any root domain
>> associated to it? If it had, we could just subtract the maximum
>> utilizations of set1 and set2 to it when creating the root domains of
>> set1 and set2.
> ...
> So, this idea of mine had no sense.
>
> I think the correct solution is what you implemented in your patchset
> (if I understand it correctly).
>
> If we want to have task spanning multiple root domains, many more
> changes in the code are needed... I am wondering if it would make more
> sense to track utilizations per runqueue (instead of per root domain):
> - when a task tries to become SCHED_DEADLINE, we count how many CPUs are
>   in its affinity mask. Let's call "n" this number
> - then, we sum u / n (where "u" is the task's utilization) to the
>   utilization of every runqueue that is in its affinity mask, and we
>   check if all the sums are below the schedulability bound
>
> For tasks spanning one single root domain, this should be equivalent to
> the current admission test. Moreover, this check should ensure that no
> root domain can be ever overloaded (even if tasks span multiple
> domains).

This is an idea worth exploring.

> But I do not know the locking implications for this idea... I suspect
> it will not scale :(

Right, scaling could be a problem - we'd have to prototype it and see
how bad things get.  We _may_ be able to figure something out with RCU
trickery.

As I mention in a previous email I toyed with the idea of extending
the DL code to support more than one root domain.  Maybe it is time to
go back to it, finish the admission test and publish just that part...
At least we would have code to comment on.

Regardless of the avenue we choose to go with I think we could use my
current solution as a stepping stone while we figure out what we
really want to do.  At least it would be an improvement on the current
situation.

>
>
>
>                                 Luca

  reply	other threads:[~2017-08-25 19:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 21:20 [PATCH 0/7] sched/deadline: fix cpusets bandwidth accounting Mathieu Poirier
2017-08-16 21:20 ` [PATCH 1/7] sched/topology: Adding function partition_sched_domains_locked() Mathieu Poirier
2017-08-16 21:20 ` [PATCH 2/7] cpuset: Rebuild root domain deadline accounting information Mathieu Poirier
2017-08-16 21:20 ` [PATCH 3/7] sched/deadline: Keep new DL task within root domain's boundary Mathieu Poirier
2017-08-16 21:20 ` [PATCH 4/7] cgroup: Constrain 'sched_load_balance' flag when DL tasks are present Mathieu Poirier
2017-08-16 21:20 ` [PATCH 5/7] cgroup: Concentrate DL related validation code in one place Mathieu Poirier
2017-08-16 21:20 ` [PATCH 6/7] cgroup: Constrain the addition of CPUs to a new CPUset Mathieu Poirier
2017-08-16 21:20 ` [PATCH 7/7] sched/core: Don't change the affinity of DL tasks Mathieu Poirier
2017-08-22 12:21 ` [PATCH 0/7] sched/deadline: fix cpusets bandwidth accounting Luca Abeni
2017-08-23 19:47   ` Mathieu Poirier
2017-08-24  7:53     ` Luca Abeni
2017-08-24  8:29       ` Juri Lelli
2017-08-24 20:32       ` Mathieu Poirier
2017-08-25  6:02         ` luca abeni
2017-08-25  9:52           ` Luca Abeni
2017-08-25 19:53             ` Mathieu Poirier [this message]
2017-08-25 20:35             ` Mathieu Poirier
2017-08-25 14:37     ` Luca Abeni
2017-08-25 20:29       ` Mathieu Poirier
2017-10-11 16:02 ` Peter Zijlstra
2017-10-12 16:57   ` Mathieu Poirier
2017-10-13  8:04     ` Luca Abeni

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=CANLsYkxSvJuX+DJqRCButY--VCMfb+XHRN-3wzQkbxHHNrpg4g@mail.gmail.com \
    --to=mathieu.poirier@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@redhat.com \
    --cc=claudio@evidence.eu.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=luca.abeni@santannapisa.it \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=tommaso.cucinotta@sssup.it \
    --cc=vbabka@suse.cz \
    --cc=weiyongjun1@huawei.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;
as well as URLs for NNTP newsgroup(s).