Received: by 10.213.65.68 with SMTP id h4csp2127607imn; Thu, 5 Apr 2018 09:24:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/CkUcdXjmmZURsU4l+cFWI0bPYePJqBf9YR0k+S+gmREiZhb0usYta++756S1ZNmPRFzaN X-Received: by 10.98.141.205 with SMTP id p74mr17650415pfk.210.1522945464913; Thu, 05 Apr 2018 09:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522945464; cv=none; d=google.com; s=arc-20160816; b=mCCgXxQZswjsA6EIuFgdhROsG6kJmViYX9teUILwyjfD0TzFWLlwbP2ui371bGV/Ih 4YZsfdt3SHSuk1y37vsyYZGEA3AkDqEEEL0M0jCUSx9vsbhUlGhfilTbLAOQoLQYVhGP 21TWgvDVKxMQbySSSLuVcwOFcZMpg4BpTrsUOmrVQI8uK9WM8RZq/JpBv4aUAEA60blq eB3uZSD8/zPKxlHdY2+rhcET0rmTk5INrurSBkZEQRk0MaJl511o3NQkGLBSi8+ues+A R60EUVG/e3XwvYM20Bj/SUsGXLtryl880o4vev0lWT5HgF8Wa5afCGEHk+UHLmI3ORoh 8Uew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=kvZqaNkx1ps92Do/apIvNXnWEEPIzPup1Na7ZvbIABE=; b=obyI1ICLl/NC1TECdFu3fMTflI/5876nN1qLuAT3GrnEH2NBOFUInFNJ21xntz2aFj aHq/052Wbi5K2IlK7gOiA/hW8s0Wwv8CcAKt3SS0wUZdLTA2SPgn4+cuP8n1Kny9OfLz 4gmDbLixX1QX6vkqqnWxvw65RK50iPTOfyX4bOijy/nvpk9Fody7ORTIxLtDSmMO6zaZ qCEBh0JvHfPfRNg+lG3leO2ziE8/JQ2akeWoz71uHUq7jmPBbPFPq/LVaVrEEuAQJLAC 7u49f2c97rGdI95FfIFKEuSJEo5pl5C/6QWW1daoFowCsCwosriuimm7B0Fa6sxQWMBk MY0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SHyXzdx5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 99-v6si6132766plc.601.2018.04.05.09.24.11; Thu, 05 Apr 2018 09:24:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=SHyXzdx5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbeDEQXK (ORCPT + 99 others); Thu, 5 Apr 2018 12:23:10 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:53864 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbeDEQXJ (ORCPT ); Thu, 5 Apr 2018 12:23:09 -0400 Received: by mail-it0-f48.google.com with SMTP id m134-v6so3431782itb.3 for ; Thu, 05 Apr 2018 09:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kvZqaNkx1ps92Do/apIvNXnWEEPIzPup1Na7ZvbIABE=; b=SHyXzdx5ZqXIjOnKJxe+G0NWR4pqwWjRGYAzYz4jxjH7MNkNIsjNua1MkhdlaD31u4 LMCUxWIpMhztQqFoeJCp29YiqUMin4DXZMlaM/coZ1nDPZctDrSdFXGY7DTKjA28mZFy 9jBjaUjkMFkTYVZECwLLQmIzbhVMFIT89K1zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kvZqaNkx1ps92Do/apIvNXnWEEPIzPup1Na7ZvbIABE=; b=XgI2WurzDxGONs6WZIqRCKFFwpjsqciueGMICYbC4bDAlkaxpRAR/RIUGS4x67J11E 3rT8Pm1NilBgYemGal8ieGRUCm8Wy6XBPiFfcBwaMF666SzgUyIJVnQ0wZO28jXJBcxA efIbAL1ZeBvwYXVB1rGringJuGlywbhv31Nxbg0W+5fFfQV3cVm8woSAZlIFHtJgfSeK Fih8dA2XA5S3q86ddhHTjbYxdpXenc3q26kngLtMQl4jw8YBPVoUswKOjMwskvM9Rou+ KYIVQ7seCEOmziSxo5YeVpb736NaKXv0ZVQ7dfrwFhHBmzaJWeABNeCYPHVkuegArw/u 73eg== X-Gm-Message-State: ALQs6tC+u4Lu0hz0zTf1WGp10aTXDTwruyr4dWrCaYy0yuY4mCfQFHHa txPaGMbslFCfcdi/kCzXNyvE1UShU9WY/LmZ0CoyRA== X-Received: by 2002:a24:d8f:: with SMTP id 137-v6mr15453515itx.30.1522945388622; Thu, 05 Apr 2018 09:23:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.222.20 with HTTP; Thu, 5 Apr 2018 09:22:48 -0700 (PDT) In-Reply-To: <20180405154630.GS4589@e105550-lin.cambridge.arm.com> References: <1522223215-23524-1-git-send-email-vincent.guittot@linaro.org> <20180329125324.GR4589@e105550-lin.cambridge.arm.com> <74865492-d9a6-649d-d37c-a5a6a8c28f23@arm.com> <20180405154630.GS4589@e105550-lin.cambridge.arm.com> From: Vincent Guittot Date: Thu, 5 Apr 2018 18:22:48 +0200 Message-ID: Subject: Re: [PATCH] sched: support dynamiQ cluster To: Morten Rasmussen Cc: Valentin Schneider , Catalin Marinas , Will Deacon , LAK , linux-kernel , Peter Zijlstra , Dietmar Eggemann , Chris Redpath Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Morten, On 5 April 2018 at 17:46, Morten Rasmussen wrote: > On Wed, Apr 04, 2018 at 03:43:17PM +0200, Vincent Guittot wrote: >> On 4 April 2018 at 12:44, Valentin Schneider wrote: >> > Hi, >> > >> > On 03/04/18 13:17, Vincent Guittot wrote: >> >> Hi Valentin, >> >> >> > [...] >> >>> >> >>> I believe ASYM_PACKING behaves better here because the workload is only >> >>> sysbench threads. As stated above, since task utilization is disregarded, I >> >> >> >> It behaves better because it doesn't wait for the task's utilization >> >> to reach a level before assuming the task needs high compute capacity. >> >> The utilization gives an idea of the running time of the task not the >> >> performance level that is needed >> >> >> > >> > That's my point actually. ASYM_PACKING disregards utilization and moves those >> > threads to the big cores ASAP, which is good here because it's just sysbench >> > threads. >> > >> > What I meant was that if the task composition changes, IOW we mix "small" >> > tasks (e.g. periodic stuff) and "big" tasks (performance-sensitive stuff like >> > sysbench threads), we shouldn't assume all of those require to run on a big >> > CPU. The thing is, ASYM_PACKING can't make the difference between those, so >> >> That's the 1st point where I tend to disagree: why big cores are only >> for long running task and periodic stuff can't need to run on big >> cores to get max compute capacity ? >> You make the assumption that only long running tasks need high compute >> capacity. This patch wants to always provide max compute capacity to >> the system and not only long running task > > There is no way we can tell if a periodic or short-running tasks > requires the compute capacity of a big core or not based on utilization > alone. The utilization can only tell us if a task could potentially use > more compute capacity, i.e. the utilization approaches the compute > capacity of its current cpu. > > How we handle low utilization tasks comes down to how we define > "performance" and if we care about the cost of "performance" (e.g. > energy consumption). > > Placing a low utilization task on a little cpu should always be fine > from _throughput_ point of view. As long as the cpu has spare cycles it I disagree, throughput is not only a matter of spare cycle it's also a matter of how fast you compute the work like with IO activity as an example > means that work isn't piling up faster than it can be processed. > However, from a _latency_ (completion time) point of view it might be a > problem, and for latency sensitive tasks I can agree that going for max > capacity might be better choice. > > The misfit patches places tasks based on utilization to ensure that > tasks get the _throughput_ they need if possible. This is in line with > the placement policy we have in select_task_rq_fair() already. > > We shouldn't forget that what we are discussing here is the default > behaviour when we don't have sufficient knowledge about the tasks in the > scheduler. So we are looking a reasonable middle-of-the-road policy that > doesn't kill your performance or the battery. If user-space has its own But misfit task kills performance and might also kills your battery as it doesn't prevent small task to run on big cores The default behavior of the scheduler is to provide max _throughput_ not middle performance and then side activity can mitigate the power impact like frequency scaling or like EAS which tries to optimize the usage of energy when system is not overloaded. With misfit task, you make the assumption that short task on little core is the best placement to do even for a performance PoV. It seems that you make some power/performance assumption without using an energy model which can make such decision. This is all the interest of EAS. > opinion about performance requirements it is free to use task affinity > to control which cpu the task end up on and ensure that the task gets > max capacity always. On top of that we have had interfaces in Android > for years to specify performance requirements for task (groups) to allow > small tasks to be placed on big cpus and big task to be placed on little > cpus depending on their requirements. It is even tied into cpufreq as > well. A lot of effort has gone into Android to get this balance right. > Patrick is working hard on upstreaming some of those features. > > In the bigger picture always going for max capacity is not desirable for > well-configured big.LITTLE system. You would never exploit the advantage > of the little cpus as you always use big first and only use little when > the bigs are overloaded at which point having little cpus at all makes If i'm not wrong misfit task patchset doesn't prevent little task to run on big core > little sense. Vendors build big.LITTLE systems because they want a > better performance/energy trade-off, if they wanted max capacity always, > they would just built big-only systems. And that's all the purpose of the EAS patchset. EAS patchset is there to put some energy awareness in the scheduler decision. There is 2 running mode for EAS: one when there is spare cycles so tasks can be placed to optimize energy consumption. And one when the system or part of the system is overloaded and it goes back to default performance mode because there is no interest for energy efficiency and we just want to provide max performance. So the asym packing fits with this latter mode as it provide the max compute capacity to the default mode and doesn't break EAS as it uses the load balance which is disable by EAS in not overloaded mode Vincent > > If we would be that concerned about latency, DVFS would be a problem too > and we would use nothing but the performance governor. So seen in the > bigger picture I have to disagree that blindly going for max capacity is > the right default policy for big.LITTLE. As soon as we involve a energy > model in the task placement decisions, it definitely isn't. > > Morten