Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3440921pxy; Tue, 4 May 2021 02:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcDPWoTxyNyWy0M2tQVmMqn3wxBMlyEHBVXYhcGLfGbe9aXdV87MoAqQvsCEkXq2japJGz X-Received: by 2002:a17:90a:a081:: with SMTP id r1mr26439630pjp.101.1620119496787; Tue, 04 May 2021 02:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620119496; cv=none; d=google.com; s=arc-20160816; b=D6yPUv9m2MR1o9jDSllYJM62tDLnY62hYxnWLQMMPsPk8OgIDWnFS8ii3qaV7GZpht isrXQXgLKCwtb9anfBEQuqefgPnXTK+BvjVZrSaAmCnYxDtUTmVbOu5KP8zETKtSo6G6 neWMuDzJTusW/cEUMqvu9KW9iGzv6bGaVMZmcAZrWn72HhVG9zSX887s/mZawN7mMy5E Eiownn4ae/LYSiyZGckHEaubml64o5ZdC6gdJixEWSZ6J8onIFv4Fu+sAmdZarVMNZLN my7xDRB9jqdposmdWiLQI7gxx0B9Qciqoxwt9i9wxKAZLHSrH+3Qxw07o2wit6YuoJ6Y /fBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5lwDg4JmkMyGLwZAzWLMwPd5Ajid3XuHUyBGFy01Klg=; b=nO/TMaTUZTsYKxdugZnW/QxRDtLrjGJ65U0WRqP9+xbcZ5d8eTHAMyQavfwKaiWCSr 2peYQeoBDeAF022Z8bPZTrpPDKPPaT42rTRCuOPsqHlo1YRjME9n+1cHx55Th/A5sqmc i6rucRNWtyCGwD+jIcMnaYgE06D8L5HPfiJlqYe9iuqMd08nsHy9ewG/yTGDa9PKxta3 lg4RiKHZdkEe3LtF+LUWAXgPJhnTh69jKfXdQhwJ7EECG+drlWx9t7Y8nelXWDTvvvO+ h//wyu+1sMyzO4GYFkldOMjBb6oh1y1qynIEN/S6rkwZLhf0u4/v64OTkfZHZ+KzcZsD UPJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si3381208pgb.316.2021.05.04.02.11.23; Tue, 04 May 2021 02:11:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229911AbhEDJLs (ORCPT + 99 others); Tue, 4 May 2021 05:11:48 -0400 Received: from foss.arm.com ([217.140.110.172]:56042 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbhEDJLs (ORCPT ); Tue, 4 May 2021 05:11:48 -0400 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 608B4ED1; Tue, 4 May 2021 02:10:53 -0700 (PDT) Received: from [10.57.63.61] (unknown [10.57.63.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7DE673F73B; Tue, 4 May 2021 02:10:50 -0700 (PDT) Subject: Re: [PATCH v3 0/2] sched/fair: find_energy_efficient_cpu() enhancements To: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, qperret@qperret.net, Lukasz.Luba@arm.com, dietmar.eggemann@arm.com Cc: Vincent.Donnefort@arm.com, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com References: <20210504090743.9688-1-Pierre.Gondois@arm.com> From: Pierre Gondois Message-ID: Date: Tue, 4 May 2021 10:10:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210504090743.9688-1-Pierre.Gondois@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xuewen, Please let me know if you have some comments, Pierre On 5/4/21 10:07 AM, Pierre Gondois wrote: > V2: > - Split the patch in 2. [Quentin] > - Add testing results to the cover-letter. [Dietmar] > - Put back 'rcu_read_unlock()' to unlock the rcu > earlier. [Dietmar] > - Various comments. [Dietmar/Quentin] > > V3: > - Layout/phrasing. [Dietmar] > > This patchset prevents underflows in find_energy_efficient_cpu(). > This is done in the second patch: > sched/fair: Fix negative energy delta in find_energy_efficient_cpu() > > The first patch: > sched/fair: Only compute base_energy_pd if necessary > prevents an unnecessary call to compute_energy() if no CPU is available > in a performance domain (pd). > When looping over the pds, it also allows to gather the calls > to compute_energy(), reducing the chances of having utilization signals > being concurrently updated and having a 'negative delta'. > > The energy tests of the initial EAS enablement at: > https://lkml.kernel.org/r/20181203095628.11858-1-quentin.perret@arm.com > have been executed using LISA on a Juno-r2 (2xA57 + 4xA53). > > To recall the test: > "10 iterations of between 10 and 50 periodic rt-app tasks (16ms period, > 5% duty-cycle) for 30 seconds with energy measurement. Unit is Joules. > The goal is to save energy, so lower is better." > "Energy is measured with the onboard energy meter. Numbers include > consumption of big and little CPUs." > > +----------+-----------------+-------------------------+ > | | Without patches | With patches | > +----------+--------+--------+------------------+------+ > | Tasks nb | Mean | CI* | Mean | CI* | > +----------+--------+--------+------------------+------+ > | 10 | 6.57 | 0.24 | 6.46 (-1.63%) | 0.27 | > | 20 | 12.44 | 0.21 | 12.44 (-0.01%) | 0.14 | > | 30 | 19.10 | 0.78 | 18.75 (-1.85%) | 0.15 | > | 40 | 27.27 | 0.53 | 27.35 (+0.31%) | 0.33 | > | 50 | 36.55 | 0.42 | 36.28 (-0.74%) | 0.42 | > +----------+-----------------+-------------------------+ > CI: confidence interval > > For each line, the intervals of values w/ w/o the patches are > overlapping (consider Mean +/- CI). Thus, the energy results shouldn't > have been impacted. > > Pierre Gondois (2): > sched/fair: Only compute base_energy_pd if necessary > sched/fair: Fix negative energy delta in find_energy_efficient_cpu() > > kernel/sched/fair.c | 68 ++++++++++++++++++++++++++------------------- > 1 file changed, 39 insertions(+), 29 deletions(-) >