Messages in this thread | | | Date | Fri, 14 Jan 2022 16:39:17 +0800 | Subject | Re: [RFC PATCH] sched: introduce group balancer | From | 王贇 <> |
| |
在 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
>
| |