From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E723BC4646D for ; Mon, 6 Aug 2018 10:08:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A010B219DA for ; Mon, 6 Aug 2018 10:08:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A010B219DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728440AbeHFMQg (ORCPT ); Mon, 6 Aug 2018 08:16:36 -0400 Received: from foss.arm.com ([217.140.101.70]:35670 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbeHFMQf (ORCPT ); Mon, 6 Aug 2018 08:16:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E27227A9; Mon, 6 Aug 2018 03:08:14 -0700 (PDT) Received: from [0.0.0.0] (e107985-lin.Emea.Arm.com [10.4.12.239]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0C1C73F5D0; Mon, 6 Aug 2018 03:08:09 -0700 (PDT) Subject: Re: [PATCH v5 09/14] sched: Add over-utilization/tipping point indicator To: Vincent Guittot , Quentin Perret Cc: Peter Zijlstra , "Rafael J. Wysocki" , linux-kernel , "open list:THERMAL" , "gregkh@linuxfoundation.org" , Ingo Molnar , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Thara Gopinath , viresh kumar , Todd Kjos , Joel Fernandes , "Cc: Steve Muckle" , adharmap@quicinc.com, "Kannan, Saravana" , pkondeti@codeaurora.org, Juri Lelli , Eduardo Valentin , Srinivas Pandruvada , currojerez@riseup.net, Javi Merino References: <20180802153035.vjtmqwdwujvt7ojs@queper01-lin> <20180802160009.uhwwj3tqrqmv7q5a@queper01-lin> <20180802161027.v2ctgscuc4uxbb7u@queper01-lin> <20180802165924.7ywgoxj2jwftxycz@queper01-lin> <20180803081850.hj7bp5ognuywapmd@queper01-lin> <20180803155547.sxlhxpmhwcoappit@queper01-lin> From: Dietmar Eggemann Message-ID: <68689fcb-3cb8-4685-58ef-0bec84be2047@arm.com> Date: Mon, 6 Aug 2018 12:08:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/06/2018 10:40 AM, Vincent Guittot wrote: > On Fri, 3 Aug 2018 at 17:55, Quentin Perret wrote: >> >> On Friday 03 Aug 2018 at 15:49:24 (+0200), Vincent Guittot wrote: >>> On Fri, 3 Aug 2018 at 10:18, Quentin Perret wrote: >>>> >>>> On Friday 03 Aug 2018 at 09:48:47 (+0200), Vincent Guittot wrote: >>>>> On Thu, 2 Aug 2018 at 18:59, Quentin Perret wrote: [...] >> I think we're discussing two different things right now: >> 1. Should forkees go in find_energy_efficient_cpu() ? >> 2. Should forkees have 0 of initial util_avg when EAS is enabled ? > > It's the same topic: How EAS should consider a newly created task ? > > For now, we let the "performance" mode selects a CPU. This CPU will > most probably be worst CPU from a EAS pov because it's the idlest CPU > in the idlest group which is the opposite of what EAS tries to do > > The current behavior is : > For every new task, the cpu selection is done assuming it's a heavy > task with the max possible load_avg, and it looks for the idlest cpu. > This means that if the system is lightly loaded, scheduler will select > most probably a idle big core. AFAICS, task load doesn't seem to be used for find_idlest_cpu() ( find_idlest_group() and find_idlest_group_cpu()). So the forkee (SD_BALANCE_FORK) is placed independently of his task load. Task load (task_h_load(p)) is used in wake_affine()->wake_affine_weight() but for this to be called it has to be a wakeup (SD_BALANCE_WAKE). > The utilization of this new task is then set to half of the remaining > capacity of the selected CPU which means that the idlest you are, the > biggest the task will be initialized to. This can easily be half a big > core which can be bigger than the max capacity of a little like on > hikey960. Then, util_est will keep track of this value for a while > which will make this task like a big one. [...] From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dietmar Eggemann Subject: Re: [PATCH v5 09/14] sched: Add over-utilization/tipping point indicator Date: Mon, 6 Aug 2018 12:08:07 +0200 Message-ID: <68689fcb-3cb8-4685-58ef-0bec84be2047@arm.com> References: <20180802153035.vjtmqwdwujvt7ojs@queper01-lin> <20180802160009.uhwwj3tqrqmv7q5a@queper01-lin> <20180802161027.v2ctgscuc4uxbb7u@queper01-lin> <20180802165924.7ywgoxj2jwftxycz@queper01-lin> <20180803081850.hj7bp5ognuywapmd@queper01-lin> <20180803155547.sxlhxpmhwcoappit@queper01-lin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org To: Vincent Guittot , Quentin Perret Cc: Peter Zijlstra , "Rafael J. Wysocki" , linux-kernel , "open list:THERMAL" , "gregkh@linuxfoundation.org" , Ingo Molnar , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Thara Gopinath , viresh kumar , Todd Kjos , Joel Fernandes , "Cc: Steve Muckle" , adharmap@quicinc.com, "Kannan, Saravana" , pkondeti@codeaurora.org, Juri Lelli List-Id: linux-pm@vger.kernel.org On 08/06/2018 10:40 AM, Vincent Guittot wrote: > On Fri, 3 Aug 2018 at 17:55, Quentin Perret wrote: >> >> On Friday 03 Aug 2018 at 15:49:24 (+0200), Vincent Guittot wrote: >>> On Fri, 3 Aug 2018 at 10:18, Quentin Perret wrote: >>>> >>>> On Friday 03 Aug 2018 at 09:48:47 (+0200), Vincent Guittot wrote: >>>>> On Thu, 2 Aug 2018 at 18:59, Quentin Perret wrote: [...] >> I think we're discussing two different things right now: >> 1. Should forkees go in find_energy_efficient_cpu() ? >> 2. Should forkees have 0 of initial util_avg when EAS is enabled ? > > It's the same topic: How EAS should consider a newly created task ? > > For now, we let the "performance" mode selects a CPU. This CPU will > most probably be worst CPU from a EAS pov because it's the idlest CPU > in the idlest group which is the opposite of what EAS tries to do > > The current behavior is : > For every new task, the cpu selection is done assuming it's a heavy > task with the max possible load_avg, and it looks for the idlest cpu. > This means that if the system is lightly loaded, scheduler will select > most probably a idle big core. AFAICS, task load doesn't seem to be used for find_idlest_cpu() ( find_idlest_group() and find_idlest_group_cpu()). So the forkee (SD_BALANCE_FORK) is placed independently of his task load. Task load (task_h_load(p)) is used in wake_affine()->wake_affine_weight() but for this to be called it has to be a wakeup (SD_BALANCE_WAKE). > The utilization of this new task is then set to half of the remaining > capacity of the selected CPU which means that the idlest you are, the > biggest the task will be initialized to. This can easily be half a big > core which can be bigger than the max capacity of a little like on > hikey960. Then, util_est will keep track of this value for a while > which will make this task like a big one. [...]