Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp906604rwb; Mon, 26 Sep 2022 07:20:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5U71bvfIaKOPDlRy0tdUryQnhAtbZ6WYUjgnluOG4VFSMSSQNx8QJnYnj4DJYE0AGBVnht X-Received: by 2002:a50:9510:0:b0:453:dded:60e with SMTP id u16-20020a509510000000b00453dded060emr22907629eda.204.1664202006326; Mon, 26 Sep 2022 07:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664202006; cv=none; d=google.com; s=arc-20160816; b=luGZIHC8lvKRAmMgiX2QaZWdRuOT8zRGpVBr8uC7pzaxqp4E/cKWxhB3YP5WtoGWxD hsq54t7M675XCFc/s0jj8OZU1iS6EminZPbQmDcUc3AH2VhGW0xbtqq11d1netEbAfRT R6tfReJw503Lir2QacjBRtwXNVE1OCNFGM7FFlOlCBCSrdRX+j6gqMDcrf0pAiovxUPF QUJrCUnjN6c2h0qdB+eO8BHCRVuVlJRIcPUzHSHXT3IScqHwWcS4hjlmiqkJRF4wqUmR kEKwVoP8ZB4I0xVMnPdo4i+nU55GiL5mWrF3Vv2QsEr6CRWd7VsXd5Uvwe2uqrnXT74+ XCmA== 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=5qyi6N11lBVDzInrZxwOq6MUgnQjpwQhKOlySDdKRIs=; b=FT1HbQp8kr6UWMJUyT5E29pFlfv6qJ7xrTVncIDU79dyvyaooU18MNj+M7/bzJ7ZU1 eTyBvQqTAB4muQ9HtWER6ME330AO35uGjUbo6iSJ2RClmaShz1ED/uKqtxUgvCBe1YAk TiZ9fOpP4NdnQ+bA/BZF3y/JKODmzleow4QacBcILQXPIUkSXE7fsLq+Hi3OrDcifyeV Ldb4ZDSijl3Oo2znxXDW/M5Ph6QikW6nzynph4G5NneaVvoOACdot3W+4C+S1KFXnt2t Bj4cjCjKXyqHagV74GOhbVTK3pPpZFwVamcmheaFxFDVFABhLzEhAsDJoxBgvq2kRGSS uQvw== 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 dn12-20020a17090794cc00b0077c2e4f3c39si57234ejc.26.2022.09.26.07.19.38; Mon, 26 Sep 2022 07:20:06 -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 S233643AbiIZOIv (ORCPT + 99 others); Mon, 26 Sep 2022 10:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234215AbiIZOIP (ORCPT ); Mon, 26 Sep 2022 10:08:15 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58DB18E985 for ; Mon, 26 Sep 2022 05:19:11 -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 56C71ED1; Mon, 26 Sep 2022 05:13:39 -0700 (PDT) Received: from [10.34.100.114] (pierre123.nice.arm.com [10.34.100.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA4553F73B; Mon, 26 Sep 2022 05:13:28 -0700 (PDT) Message-ID: Date: Mon, 26 Sep 2022 14:13:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/2] sched/fair: Check if prev_cpu has highest spare cap in feec() Content-Language: en-US To: linux-kernel@vger.kernel.org, Peter Zijlstra , Dietmar Eggemann Cc: qperret@google.com, Ingo Molnar , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider References: <20220819153320.291720-1-pierre.gondois@arm.com> <20220819153320.291720-2-pierre.gondois@arm.com> <42b2c57d-33d4-dc41-efc4-682aa02f9429@arm.com> From: Pierre Gondois In-Reply-To: <42b2c57d-33d4-dc41-efc4-682aa02f9429@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Hello Peter, The second patch: -[PATCH 2/2] sched/fair: Use IRQ scaling for all sched classes must be dropped, cf. Vincent Guittot's review, but I believe this patch should be ok to take if there is no other comment, Regards, Pierre On 8/29/22 07:13, Dietmar Eggemann wrote: > On 19/08/2022 17:33, Pierre Gondois wrote: >> When evaluating the CPU candidates in the perf domain (pd) containing >> the previously used CPU (prev_cpu), find_energy_efficient_cpu() >> evaluates the energy of the pd: >> - without the task (base_energy) >> - with the task placed on prev_cpu (if the task fits) >> - with the task placed on the CPU with the highest spare capacity, >> prev_cpu being excluded from this set >> >> If prev_cpu is already the CPU with the highest spare capacity, >> max_spare_cap_cpu will be the CPU with the second highest spare >> capacity. >> >> On an Arm64 Juno-r2, with a workload of 10 tasks at a 10% duty cycle, >> when prev_cpu and max_spare_cap_cpu are both valid candidates, >> prev_spare_cap > max_spare_cap at ~82%. >> Thus the energy of the pd when placing the task on max_spare_cap_cpu >> is computed with no possible positive outcome 82% most of the time. >> >> Do not consider max_spare_cap_cpu as a valid candidate if >> prev_spare_cap > max_spare_cap. >> >> Signed-off-by: Pierre Gondois > > LGTM. When I ran the workload I see this happening in 50%-90% of the EAS > wakeups. This should prevent one needless compute_energy() call out of 7 > on a typical 3-gear system like 2x2x4 in these cases. > > Reviewed-by: Dietmar Eggemann > > [...]