mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 王贇 <yun.wang@linux.alibaba.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Chris Down <chris@chrisdown.name>,
	Vipin Sharma <vipinsh@google.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Cruz Zhao <cruzzhao@linux.alibaba.com>,
	Tianchen Ding <dtcccc@linux.alibaba.com>,
	linux-kernel@vger.kernel.org, Waiman Long <longman@redhat.com>
Subject: Re: [RFC PATCH] sched: introduce group balancer
Date: Fri, 14 Jan 2022 16:39:17 +0800	[thread overview]
Message-ID: <d2380831-0205-3ac1-9d64-63a27e148b9d@linux.alibaba.com> (raw)
In-Reply-To: <Yd/2aRcQlxm3Sh41@hirez.programming.kicks-ass.net>



在 2022/1/13 下午5:52, Peter Zijlstra 写道:
> On Thu, Jan 13, 2022 at 03:18:01PM +0800, 王贇 wrote:
> 
>>>> How To Use:
>>>>
>>>> To create partition, for example run:
>>>>     echo disable > /proc/gb_ctrl
>>>>     echo "0-15;16-31;32-47;48-63;" > /proc/gb_ctrl
>>>>     echo enable > /proc/gb_ctrl
>>>
>>> That's just never going to happen; please look at the cpuset partition
>>> stuff.
>>
>> Could you please give more details in here?
>>
>> We actually looking forward a way to config several cpuset partition
>> together, like here 4 cpuset partitions 0-15, 16-31, 32-47 and 48-63,
>> but can't find any existing approach...
> 
> You could extend the partitions support:
> 
>   https://lkml.kernel.org/r/20211205183220.818872-1-longman@redhat.com
> 
> And have a parent partition type that soft balances between child
> partitions or something.
Hmm.. got two ways in mind, for eg when we have cgroup hierarchy:

     CG_A
     |
     |_________
     |         |
     CG_B      CG_C
               |
               |_______
               |       |
               CG_D    CG_E

One way is to add 'cpuset.gb_cpus' which only accept one partition,
CG_A collect these partition info from B,C and balance them between
these partitions, when it's 'cpuset.gb_enable' was turned on.

But this way got problem when to turn on 'cpuset.gb_enable' in CG_C,
since C could run into the partition of B, it's child can also too,
the rule of 'parent balance child between partitions they provided'
will be broken...

Another way is to add 'cpuset.gb_partitions' just like the 'gb_ctrl'
here, then CG_B,C will join group balancer following by D,E, when
C got it's own partition configured, D,E can follow C instead.

In this way the rule 'parent balance child between partitions' could
work, IMHO this way sounds much more practical , still require the new
interface to accept multiple partitions, but now managed by cpuset
cgroup in the hierarchy way.

Not sure if we understand the suggestion correctly... please let me
know if it's not, we would like to try the second way see if it's 
working as expected firstly.

Regards,
Michael Wang

> 

      reply	other threads:[~2022-01-14  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04  7:33 王贇
2022-01-12  2:59 ` 王贇
2022-01-12  8:55 ` Peter Zijlstra
2022-01-13  7:18   ` 王贇
2022-01-13  9:52     ` Peter Zijlstra
2022-01-14  8:39       ` 王贇 [this message]

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=d2380831-0205-3ac1-9d64-63a27e148b9d@linux.alibaba.com \
    --to=yun.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=chris@chrisdown.name \
    --cc=cruzzhao@linux.alibaba.com \
    --cc=daniel@iogearbox.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=dtcccc@linux.alibaba.com \
    --cc=juri.lelli@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=longman@redhat.com \
    --cc=masahiroy@kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vbabka@suse.cz \
    --cc=vincent.guittot@linaro.org \
    --cc=vipinsh@google.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

all inboxes | Powered by JetHome®