Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2618453imn; Tue, 2 Aug 2022 09:32:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5HZerVKlzAuso1vc5z71ndyddubU9QbNTdNJVunuEvvM3PRw4KZt3HphiZc6pfcaG1yyeX X-Received: by 2002:a17:907:9810:b0:730:4b90:983 with SMTP id ji16-20020a170907981000b007304b900983mr12642478ejc.106.1659457964880; Tue, 02 Aug 2022 09:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659457964; cv=none; d=google.com; s=arc-20160816; b=RjbSMMuIMdqBJJ20jHOQwlssg+2f4ltDOZsQiMtvN9jIyqP+YiD5PKRs2k6HX33XKm Ort1EGx6eHtwN0BATYX5p0AWoJos04mIGOiqUsTfeTZi7wwQdpAxx4PN2zL1q7F1XXyP PgQn8DeNtSBRnGGJM9xTfmG8qo/W1wS4E8n3GBFiDP4Kr925wqfOmb222X1wG+V3YH45 is1syAMewfxmJ7ecruYDIGPQkI+sxJhm44ycmz/5Dxl3omBYeH8Whd06+qu2WtzM/hFT Eu1xtZv8BweZl8jllt7givDDxOo6QAO6JIv+GtmMZDkTZgSbPL3Wl4ELU8EHOVuyHc8X Fznw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UMGOFT5jA8h5jAt+q1HOmEsKA066Wu3foFhLysXFrXU=; b=HnRJp+fOKjoqJY/A53ad1e3cXcWerM6qCt6Fkp4o00ZUg99zSpoKh/mKh38yTEaiDZ u2bskuEgzvhXlu1oCNYY6JwuyGNOfKOHNPxo4CLTc7EsQ43Bk9i9v9tWiBWA2AS4do0v nRqCjIKd/ZD4AoFU9nMmrxPaZgbopE0jYEwBNy4/FVQ+hk6TXDZD+sWevaDCSL4wDxwt bSbAGVBFAVRpuryzJysTgeBk+Ao3RqEQ2UqxZ5ySUh7KI9ZgUsjkTHcNjLWH+ZZjZNtx ItJe8d703dYaNnL578eW0ZsN8AsDq2OQdlNGKbK9jrwivUs9B7uZ2jBCHrIQSttqx/1Q QpjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a05640240d600b0043dcc0de9fbsi4597020edb.615.2022.08.02.09.32.19; Tue, 02 Aug 2022 09:32:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237059AbiHBQXG (ORCPT + 99 others); Tue, 2 Aug 2022 12:23:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237198AbiHBQXC (ORCPT ); Tue, 2 Aug 2022 12:23:02 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5B1CF1CFE2 for ; Tue, 2 Aug 2022 09:23:01 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B8B141480; Tue, 2 Aug 2022 09:23:01 -0700 (PDT) Received: from wubuntu (unknown [10.57.10.13]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B2FF73F70D; Tue, 2 Aug 2022 09:22:59 -0700 (PDT) Date: Tue, 2 Aug 2022 17:22:57 +0100 From: Qais Yousef To: Xuewen Yan Cc: Ingo Molnar , "Peter Zijlstra (Intel)" , Vincent Guittot , Dietmar Eggemann , linux-kernel@vger.kernel.org, Wei Wang , Jonathan JMChen , Hank Subject: Re: [PATCH 1/7] sched/uclamp: Fix relationship between uclamp and migration margin Message-ID: <20220802162257.chvokc2kjyvvhitb@wubuntu> References: <20220629194632.1117723-1-qais.yousef@arm.com> <20220629194632.1117723-2-qais.yousef@arm.com> <20220721102417.cf6ukxpvkh4grjeh@wubuntu> <20220727162531.466btzfk7lfibf6u@wubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Hi Xuewen On 08/01/22 10:46, Xuewen Yan wrote: > Hi Qais > > On Thu, Jul 28, 2022 at 12:25 AM Qais Yousef wrote: [...] > > I do have a patch to add kernel doc to better explain what uclamp is. Hopefully > > I'll send this out soon. I've been sleeping on it for a long while but too many > > things to do, too little time :-) > Ah, Could this patch loop me in the future? I want to learn more from > you, Thanks! Will do! I'll be going on holidays soon, so hopefully once I'm back I'll be able to post it. [...] > > > I agree with you, but I'm still a bit concerned that such a setup will > > > cause performance issues. > > > As you say, may one want the background tasks running on the little > > > cpus, he can use cpuset to control them completely. > > > > We are actually hoping that we can enable using uclamp_max as weak affinity > > instead of the aggressive cpusets. But there's still a bit more work to do > > before we can get there. > > > > > When there are many processes in the system, if such processes always > > > fit small cores, do we need to consider more when load balancing? > > > > Oh, you're worried about packing these tasks on small cores? > > > > We've looked at that, and this should be hard to happen. > > > > EAS will always distribute tasks on max_spare_capacity cpu in the performance > > domain. Only exception I'm aware of is if a lot of tasks wake up at the same > > time. Then there's a chance (race) they all see the same max_spare capacity > > before any of these tasks gets enqueue to adjust the rq->util_avg. > > > > Packing can't happen outside of EAS AFAICT. The default behavior of the > > scheduler is to distribute tasks on idle cpus or based on load. > > > > If we're in overutilized, then select_idle_capacity() should consider the idle > > cpus only. And in load balance in general should distribute tasks based on > > idle/load. > > Yes, you're right, I'm thinking a little bit less...Thanks! It's complicated inter-relationship. Glad you asked! :-) Thanks! -- Qais Yousef