Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3327357imm; Mon, 6 Aug 2018 02:46:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpebkVQd4buFlwVGfDQXCPmrPVqFnn4bw4yaWVR8zT1NNqSlstA//y4DAQnUld9+0feBUONn X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr13473772plo.81.1533548794989; Mon, 06 Aug 2018 02:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533548794; cv=none; d=google.com; s=arc-20160816; b=WY9iPRp33Fu4Ff2Wzal2WAzwkIDbTw0QNMMvbQz/t8Qv89TysOVxki+HtyYMSdNHBq C8x9rh0oNMZZA66LDcB1+PPdopRERTq5OD6DZ8sBrcsFqbjwFuOH5nOHRrG8/nHqwcoL ASkMQCU8YstrPHQZT/GgM1TxBDa5xwr46I56DtDxC4Kv3431wTrkhj8dZ0zGyIFRDi0I JkR2Y+djr2RpYEzBMCwl81T6AcrnIKkL6UQouLIKiPdy3TaiezVX4e6zdju/JhHjbecJ Nx92qgTG61yqF/JYI+EKxJS94BNhjqXldhIdcjsU+BCIicdect/VsX4shg+peQVmv6rl ZM+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=7RArBSMmsmddmJz6mUoAyM3MOtGg93NdOEdGkiisVeg=; b=KrrDPVbSOkCd68N1YKQIuTnp1PWIiC+0EWNZXRZQKeRAK03P4IGakTzvS939+bHgsJ 6uLTLplDp2TNI2MkyHZ4g1N6nQCv8aEq3E4YfQUmFsN0Fd3Ba7FhFCQdYCFQ/HhKd7yj u+3qzvDshYrPnC2ZtnwwLfnCaun7xZrV1SvmbEXzXzGdLHNj0B7sdff/CcxJ0I1+Guye 19ef4Q46A/9meYqhqHH4oMjYA7Wb6qDOIt4xC8uFY0162Qj0fbQpKFWFOhm/Mys11LNb 1R7JvYHQ52cJ+f/j1hAb/0tuzjmZd7JQBcS/V0X95ataL5zcFMRW/E0AyBrbJFsO8lag r/Bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p67-v6si12315732pfg.295.2018.08.06.02.46.20; Mon, 06 Aug 2018 02:46:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728668AbeHFLwH (ORCPT + 99 others); Mon, 6 Aug 2018 07:52:07 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35440 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbeHFLwH (ORCPT ); Mon, 6 Aug 2018 07:52:07 -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 430537A9; Mon, 6 Aug 2018 02:43:52 -0700 (PDT) Received: from queper01-lin (queper01-lin.emea.arm.com [10.4.13.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E54A3F5D0; Mon, 6 Aug 2018 02:43:48 -0700 (PDT) Date: Mon, 6 Aug 2018 10:43:43 +0100 From: Quentin Perret To: Vincent Guittot Cc: Peter Zijlstra , "Rafael J. Wysocki" , linux-kernel , "open list:THERMAL" , "gregkh@linuxfoundation.org" , Ingo Molnar , Dietmar Eggemann , 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 Subject: Re: [PATCH v5 09/14] sched: Add over-utilization/tipping point indicator Message-ID: <20180806094342.lonjz4g3lspcatcy@queper01-lin> References: <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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 06 Aug 2018 at 10:40:46 (+0200), Vincent Guittot wrote: > On Fri, 3 Aug 2018 at 17:55, Quentin Perret wrote: > 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. Agreed, that is what should happen if the system is lightly loaded. However, I'm still not totally convinced this is wrong. It's definitely not _always_ wrong, at least. Just like starting new tasks on little CPUs isn't always wrong either. > selecting big or Little is not the problem here. The problem is that > we don't use Energy Model so we will most probably do the wrong > choice. Nevertheless, putting a task on big is clearly the wrong > choice in the case I mentioned above " shell script on hikey960". _You_ can say it's wrong because _you_ know the task composition. The scheduler has no way to tell. You could come up with a script that spawns heavy tasks every once in a while, and in this case putting those on big cores would be beneficial ... > Having something in the middle like taking into account load and/org > utilization of the parent in order to mitigate big task starting with > small utilization and small task starting with big utilization. > It's probably not perfect because big tasks can create small ones and > the opposite but if there are already big tasks, assuming that the new > one is also a big one should have less power impact as we are already > consuming power for the current bigs. At the opposite, if little are > running, assuming that new task is little will not harm the power > consumption unnecessarily. Right, we can definitely come up with something more conservative than what I'm currently proposing. I had a quick chat with Morten about this the other day and one suggestion he had was to pick the CPU with the max spare cap in the frequency domain in which the parent task is running ... In any case, I really feel like there isn't an obvious right decision here, so I'd prefer to keep things simple for now. This patch-set is a first step, and fine-grained tuning for new tasks is probably something that can be done later, if need be. What do you think ? Thanks, Quentin