Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp645729imm; Mon, 9 Jul 2018 08:10:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfjhWPh9Szxsic1wu9TLiwTyD/xUwaAKtCwJ9CDQpCd8Q4SuGAdGkIkOzZXsLX2+8Uq3+vi X-Received: by 2002:aa7:8148:: with SMTP id d8-v6mr21747015pfn.78.1531149001851; Mon, 09 Jul 2018 08:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531149001; cv=none; d=google.com; s=arc-20160816; b=T6yJNT0dGlXfb5ZKorICckL0WSl2PPZP05DqTsA/HyjgP715+20pNITt5EQRmLBiV5 7LrVSn4E8gsV+2NpqJEsE8h87kX9mRSOMIZOGxhKaOrQiVo2iybUwIbFv5cGRB56e0Dy qLoRvhC5DCJyjxyO3B8maPNuADd/rqq6T1a8rX/ffvq2YtOKHlUsY+L+cX6GfiJIiLtn apg/pA5KP0LSyG2GkgPoaOFX3kMBtZo9j4yu5NGDVKsj4D0DZyyvVYMMe97CGq7JnKYM V5twF5B5m2C80Twa0ymkTOG6GV8lJCti9ZBDHZtVO319KL5+Ei61lMLRhWkuwst0PZI2 3lww== 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=uBvYf8O7o31/DVg2NzWsVbKOT/mjtpT9R4oeYLIK6YI=; b=IzbOsyAe9+4SdtygRHn+z5EmIqdj5QMYPGF7amMPdlh3+aZzIj6zO25ckgwYx9xAf8 gGo6Xr45IrAWvGZh75R0vwtKzuqwaz4Xvhfjkz3K0qepTRbJUOPo9OKu4kWUGx92N2HI dx+mCnaArNChdEjPDZVlf8YjbtAEgCllq6T4x1p6vbSOSrrI0StapRYlyuCPvPG/pRNA TieTQ4w0e/prFF2TYUPo+h+XZUKTYgE9g2c4kMQEIvDBRzhoSjF0ozV7CuVTZU0yEshw 30hjUw8BDglq2hchkUF71WjADlHc9QAq7IoKN3YouG46kdifNISKO3B4g3Tv4nFLtHmc hS3g== 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 f40-v6si15079161plb.504.2018.07.09.08.09.40; Mon, 09 Jul 2018 08:10:01 -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 S933249AbeGIPIu (ORCPT + 99 others); Mon, 9 Jul 2018 11:08:50 -0400 Received: from foss.arm.com ([217.140.101.70]:60864 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932949AbeGIPIt (ORCPT ); Mon, 9 Jul 2018 11:08:49 -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 D6A09ED1; Mon, 9 Jul 2018 08:08:48 -0700 (PDT) Received: from e105550-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 81D463F589; Mon, 9 Jul 2018 08:08:47 -0700 (PDT) Date: Mon, 9 Jul 2018 16:08:39 +0100 From: Morten Rasmussen To: Vincent Guittot Cc: Peter Zijlstra , Ingo Molnar , Valentin Schneider , Dietmar Eggemann , gaku.inami.xh@renesas.com, linux-kernel Subject: Re: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems Message-ID: <20180709150839.GA19287@e105550-lin.cambridge.arm.com> References: <1530699470-29808-1-git-send-email-morten.rasmussen@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 12:18:27PM +0200, Vincent Guittot wrote: > Hi Morten, > > On Wed, 4 Jul 2018 at 12:18, Morten Rasmussen wrote: > > > > On asymmetric cpu capacity systems (e.g. Arm big.LITTLE) it is crucial > > for performance that cpu intensive tasks are aggressively migrated to > > high capacity cpus as soon as those become available. The capacity > > awareness tweaks already in the wake-up path can't handle this as such > > tasks might run or be runnable forever. If they happen to be placed on a > > low capacity cpu from the beginning they are stuck there forever while > > high capacity cpus may have become available in the meantime. > > > > To address this issue this patch set introduces a new "misfit" > > load-balancing scenario in periodic/nohz/newly idle balance which tweaks > > the load-balance conditions to ignore load per capacity in certain > > cases. Since misfit tasks are commonly running alone on a cpu, more > > aggressive active load-balancing is needed too. > > > > The fundamental idea of this patch set has been in Android kernels for a > > long time and is absolutely essential for consistent performance on > > asymmetric cpu capacity systems. > > > > As already said , I'm not convinced by the proposal which seems quite > complex and also adds some kind of arbitrary and fixed power > management policy by deciding which tasks can or not go on big cores > whereas there are other frameworks to take such decision like EAS or > cgroups. The misfit patches are a crucial part of the EAS solution but they also make sense for some users on their own without an energy model. This is why they are posted separately. We have already discussed at length why the patches are needed and why the look like they do here in this thread: https://lore.kernel.org/lkml/CAKfTPtD4skW_3SAk--vBEC5-m1Ua48bjOQYS0pDqW3nPSpsENg@mail.gmail.com/ > Furthermore, there is already something similar in the kernel > with SD_ASYM_PACKING and IMO, it would be better to improve this > feature (if needed) instead of adding a new one which often do similar > things. As said in the previous thread, while it might look similar it isn't. SD_ASYM_PACKING isn't utilization-based which is the key metric used for EAS, schedutil, util_est, and util_clamp. SD_ASYM_PACKING serves a different purpose (see previous thread for details). > I have rerun your tests and got same results than misfit task patchset > on my hikey960 with SD_ASYM_PACKING feature for legacy b.L topology > and fake dynamiQ topology. And it give better performance when the > pinned tasks are short and scheduler has to wait for the task to > increase their utilization before getting a chance to migrate on big > core. Right, the test cases are quite simple and could be served better by SD_ASYM_PACKING. As we already discussed in that thread, that is due to the PELT lag but this the cost we have to pay if we don't have additional information about the requirements of the task and we don't want to default to big-first with all its implications. We have covered all this in the thread in early April. > Then, I have tested SD_ASYM_PACKING with EAS patchset and they work > together for b/L and dynamiQ topology Could you provide some more details about your evaluation? It probably works well for some use-cases but it isn't really designed for what we need for EAS. Morten