Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4277AC433F5 for ; Fri, 14 Jan 2022 08:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235770AbiANIjZ (ORCPT ); Fri, 14 Jan 2022 03:39:25 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:43773 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbiANIjX (ORCPT ); Fri, 14 Jan 2022 03:39:23 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R731e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=23;SR=0;TI=SMTPD_---0V1nflZW_1642149557; Received: from 30.21.164.228(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0V1nflZW_1642149557) by smtp.aliyun-inc.com(127.0.0.1); Fri, 14 Jan 2022 16:39:18 +0800 Message-ID: Date: Fri, 14 Jan 2022 16:39:17 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [RFC PATCH] sched: introduce group balancer Content-Language: en-US To: Peter Zijlstra Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Masahiro Yamada , Andrew Morton , Nathan Chancellor , Kees Cook , Vlastimil Babka , Chris Down , Vipin Sharma , Rasmus Villemoes , Daniel Borkmann , Arnd Bergmann , Cruz Zhao , Tianchen Ding , linux-kernel@vger.kernel.org, Waiman Long References: <98f41efd-74b2-198a-839c-51b785b748a6@linux.alibaba.com> <11d4c86a-40ef-6ce5-6d08-e9d0bc9b512a@linux.alibaba.com> From: =?UTF-8?B?546L6LSH?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 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 >