Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1066202pxb; Wed, 6 Apr 2022 07:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4zTXzKC3ZVp+J4OSJnX2lKUANTN4JL/zbnXiHeYUaLsMoDH1XktXIgwI417WOCyaQ/glU X-Received: by 2002:a17:90b:1d04:b0:1c7:1174:56ae with SMTP id on4-20020a17090b1d0400b001c7117456aemr10284227pjb.153.1649257089572; Wed, 06 Apr 2022 07:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649257089; cv=none; d=google.com; s=arc-20160816; b=nvuqpiHW4unX3dL3YsJ0+sXGSIWijzdVgMLFq2OlBxLdOdbMlWWBhliJWTPjohqqSH 5/spKUqeItjD76Ezc1AUEB9u5kkjH6ZaibHaGOWTjdg787A6TDds5z9K1ZaBbvYXHvjV u58mPI0L0uZxKn2jvB31AZ0CVbIoSf68mA+EUe2xMh5z7DDQd+UYSgWa8lnv00cpQ676 xv9ZwHDzK1LJTMqjShSuzmtUq/8DTyouEUsH9GrY4Mzd3up0o1DzA9D6oAmqWvqBIKEh zu+4OMPjNwoGxrgutnLQeOOWn8PNaRi1TEgrXimz3129CPbYypSGLBaLAw1XdTI+5DxR gybQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=KxYoap3/461Nbr85B1ZXWB8qSaZQ4m/5Vhgiatt9Os4=; b=LpZCrSAuVFrBZD7oFG7lpvzScCCZO1aCr4p/7hpivyAW74gXk87Uajr1gfZ4en4eHj FlKsoUA3LuL26BUuwnVqzLWcJEJbl3ahCUS0BM5Jv73dU/V33eF7zpgDLWIK0QGbn58s VZNKkiiUP7dxm7xdzgfccFJvgfundZkaKIiwC+jJ1RHpubNJRsUHRvwh0Ii6/Fs0xrG/ DVFqczGck7pkElq3T1sJTPpXe3e+j3wevxLgQKbZ/rA0yLacSdkNmxuMdGllsj9guarV NANiWEx3LgU5XlYJLD4tplbEPFc+SZCHUDYcVYwphRV1HCAOXnwdQyxi2fNY+oBd6mkN awKA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r12-20020a63e50c000000b0039cb1232e71si1324058pgh.403.2022.04.06.07.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:58:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4020E2986DF; Wed, 6 Apr 2022 05:44:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377369AbiDFJdJ (ORCPT + 99 others); Wed, 6 Apr 2022 05:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1581107AbiDFJVY (ORCPT ); Wed, 6 Apr 2022 05:21:24 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7113115CB75; Tue, 5 Apr 2022 19:48:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=dtcccc@linux.alibaba.com;NM=1;PH=DS;RN=27;SR=0;TI=SMTPD_---0V9JnNS5_1649213273; Received: from 30.39.96.171(mailfrom:dtcccc@linux.alibaba.com fp:SMTPD_---0V9JnNS5_1649213273) by smtp.aliyun-inc.com(127.0.0.1); Wed, 06 Apr 2022 10:47:55 +0800 Message-ID: Date: Wed, 6 Apr 2022 10:47:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH v2 0/4] Introduce group balancer Content-Language: en-US To: Zefan Li , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Tejun Heo , Johannes Weiner , Michael Wang , Cruz Zhao , Masahiro Yamada , Nathan Chancellor , Kees Cook , Andrew Morton , Vlastimil Babka , "Gustavo A. R. Silva" , Arnd Bergmann , Miguel Ojeda , Chris Down , Vipin Sharma , Daniel Borkmann Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org References: <20220308092629.40431-1-dtcccc@linux.alibaba.com> From: Tianchen Ding In-Reply-To: <20220308092629.40431-1-dtcccc@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping~ Any idea for this patchset? :-) On 2022/3/8 17:26, Tianchen Ding wrote: > Modern platform are growing fast on CPU numbers. To achieve better > utility of CPU resource, multiple apps are starting to sharing the CPUs. > > What we need is a way to ease confliction in share mode, > make groups as exclusive as possible, to gain both performance > and resource efficiency. > > The main idea of group balancer is to fulfill this requirement > by balancing groups of tasks among groups of CPUs, consider this > as a dynamic demi-exclusive mode. Task trigger work to settle it's > group into a proper partition (minimum predicted load), then try > migrate itself into it. To gradually settle groups into the most > exclusively partition. > > GB can be seen as an optimize policy based on load balance, > it obeys the main idea of load balance and makes adjustment > based on that. > > Our test on ARM64 platform with 128 CPUs shows that, > throughput of sysbench memory is improved about 25%, > and redis-benchmark is improved up to about 10%. > > See each patch for detail: > The 1st patch introduces infrastructure. > The 2nd patch introduces detail about partition info. > The 3rd patch is the main part of group balancer. > The 4th patch is about stats. > > v2: > Put partition info and period settings to cpuset subsys of cgroup_v2. > > v1: https://lore.kernel.org/all/98f41efd-74b2-198a-839c-51b785b748a6@linux.alibaba.com/ > > Michael Wang (1): > sched: Introduce group balancer > > Tianchen Ding (3): > sched, cpuset: Introduce infrastructure of group balancer > cpuset: Handle input of partition info for group balancer > cpuset, gb: Add stat for group balancer > > include/linux/cpuset.h | 5 + > include/linux/sched.h | 5 + > include/linux/sched/gb.h | 70 ++++++ > init/Kconfig | 12 + > kernel/cgroup/cpuset.c | 405 +++++++++++++++++++++++++++++++- > kernel/sched/Makefile | 1 + > kernel/sched/core.c | 5 + > kernel/sched/debug.c | 10 +- > kernel/sched/fair.c | 26 ++- > kernel/sched/gb.c | 487 +++++++++++++++++++++++++++++++++++++++ > kernel/sched/sched.h | 14 ++ > 11 files changed, 1037 insertions(+), 3 deletions(-) > create mode 100644 include/linux/sched/gb.h > create mode 100644 kernel/sched/gb.c >