Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5077230imm; Tue, 31 Jul 2018 05:13:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfl7oIVCZq9sOq8tpweZ9TB3grYiMCR893V3cau4DrjZs5S3wrPov60wIQspfeXqfIWVDtg X-Received: by 2002:a63:dc17:: with SMTP id s23-v6mr20687819pgg.40.1533039237999; Tue, 31 Jul 2018 05:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533039237; cv=none; d=google.com; s=arc-20160816; b=goF+qSVk5G9YOicB4G+jKNBB0x2Oh1egfaJePqGw7AseJdztUOXWOuiR8628YflEIe JsVHYLJq7mRvQYFzpf3Qqb23kQHSPKPV6FwvqeFN/GINyZn+7Xu6Sn+wvUwVRcj7utqK rqFjDzFC/wmWyoS1rv4UGfjr15wiiKskj3uuyZ7pgZKoZTL0LfT78r/qIFyN2doWinfA u/pePeaJYuWWpPElmrUFIE/Ios43R0ShZWZbDu0gEsg5jvU8rs/wwSbWbu6q2PUidcW5 AlIz1oBHwe2vv/XHvr7KUor6zrFyGhBy/1NYnhqcycgCnEMrPHYTnP7YK6wrvqu9bTq6 vSVQ== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=VWDetoB+q1cq2/33ZivvvjDEUM2wwf4OVdVGFVmjqpY=; b=CWMX6GEkgD3DLx3bsYEPBtktKySDzTOC9Zlf3ZFs52RIzK593YyTV4rbIOgvSgwxS1 yu8JcGdfjdH07X5AW1rLTrAeoxt21WdwdMLD3+VUrg9YpQV8DhynSLAjWMzxn/fMH0qI yA/s9tHiU54uIZWfoBiqPIcrYNISCAlfZSjQe9cI43eBozjhji06vFYOm/nXjxpWmMHD iELqQBiSxd2tQIcpq17tQN59ehwoGFwRDVDm7f2VcCkiqUYRE0C+crMauAwW5h57lR8+ J5sWMC77hZ96xOZpAvfIMvdmWArAVrXPsXGRpnGHfDSw50KFf280qwOyl1qhJLMjcFkS mNTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WQWrYVL3; 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 d39-v6si12716739pla.41.2018.07.31.05.13.43; Tue, 31 Jul 2018 05:13:57 -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=WQWrYVL3; 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 S1732195AbeGaNv4 (ORCPT + 99 others); Tue, 31 Jul 2018 09:51:56 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:34421 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731131AbeGaNvz (ORCPT ); Tue, 31 Jul 2018 09:51:55 -0400 Received: by mail-it0-f66.google.com with SMTP id d70-v6so12213668ith.1 for ; Tue, 31 Jul 2018 05:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VWDetoB+q1cq2/33ZivvvjDEUM2wwf4OVdVGFVmjqpY=; b=WQWrYVL3hZOqcLlIB4O3daAAOJdfQEG41V/s9RdVxoYa/6CQdH7Nx8WxnowQ/alm8H YhaDFc7Icktl6Ifj1pF4Ktf/QgB1oTA0f/K6jsnNGu8I6ULd/Fvoz37LnZehZIaENQEY NW/CXy6FS4GPTMrs8T8opOWTjRHetEVB0c7Mk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VWDetoB+q1cq2/33ZivvvjDEUM2wwf4OVdVGFVmjqpY=; b=eArOaLd3exzbHNZ/Sq7CZ8JcwmAitEt13JDapQ6wmQSPi2Sb5uVhSuoNcIt/SaVqin 3tyyq1LIuowFTTb+HLtpgVl2eNRAU3TRnFvKtOcxgiBJ2+n2E3QR/7S/ni3q475cdUEt Kbr/lj2cV3ckcHaf0wVNny68jpUY5zpSHWRGO1vFBBT/5PZl3PSiJPaSrv21GNG18Lpe 2EtqjdHorZZ0yyQMzOUS0XUfI5wQDMxMri46OxsAthXFvACsLh6RpdqGHeau2/kEBgfR cFyZ9LwklNF8OgCaXQW1GK0oxL+ypVBKHDRcNK01FICAmeTQWLsozpESJt51Yey0Sy9u t/6g== X-Gm-Message-State: AOUpUlF1enT6zPBaF4vrfE4zH2owmlaDYZZQ96jrEAthvXR66WSc+dyQ wUBOLch/k7SrMX/mXyysPhmMBzT4ivBf27fxrhJRrA== X-Received: by 2002:a24:99c4:: with SMTP id a187-v6mr2662307ite.148.1533039112571; Tue, 31 Jul 2018 05:11:52 -0700 (PDT) MIME-Version: 1.0 References: <1530699470-29808-1-git-send-email-morten.rasmussen@arm.com> <20180709150839.GA19287@e105550-lin.cambridge.arm.com> In-Reply-To: <20180709150839.GA19287@e105550-lin.cambridge.arm.com> From: Vincent Guittot Date: Tue, 31 Jul 2018 14:11:41 +0200 Message-ID: Subject: Re: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems To: Morten Rasmussen Cc: Peter Zijlstra , Ingo Molnar , Valentin Schneider , Dietmar Eggemann , gaku.inami.xh@renesas.com, linux-kernel 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 On Mon, 9 Jul 2018 at 17:08, Morten Rasmussen wrote: > > 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 EAS needs the scheduler to move long running task on big core (especially when overloaded), and the misfit task is just one proposal > 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