Received: by 10.213.65.68 with SMTP id h4csp849818imn; Fri, 23 Mar 2018 18:49:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELtFNw3zHKpwGU08BVJLBM5A3tnUmH6WPCmHcYrBCMjFFzqT8fHQhQYcwKJ5nu9e0Us6t1Lc X-Received: by 10.167.131.199 with SMTP id j7mr25476719pfn.99.1521856195082; Fri, 23 Mar 2018 18:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521856195; cv=none; d=google.com; s=arc-20160816; b=azTDKoRWq9RTSWZyR8kIqbFsL7dIYakYo9KcHRwgYsdMEVxZOz1VPKkOSKwtxKfx+/ kOKJbFKdNlTZ/5pczXkzX+ejJPC/xlT2w52Ak9aLVNHKoxKWqHjW0ei0AEAWC/tKamzd VXVWdsiKmjUWE5CmW+UEHs8/9B5DL9zzWlS93v6dzFIBYGJPJqXtq4faezLdqr+rxZ3z EXvVn4yI//MlAI3ryUNWC7iZnyVgvkd9strZw0tnE8uoC+RNZIFATs/WzPYbTrIY6RA0 x6p38/EQ4QyUlzJb5cLoUbLTRMmNM5Ao/pfhsVclyakZbWs2tOHIn9ABHqTLGzSy36pS TMCw== 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=oMUM9j8ltPJ6dyfZeZPuGUaY3EXFYCSp0eP1RZPQ2Fg=; b=oYFGfS4Hx/Ln8fSjxK3Wj2OKB0zaWwhIHogA/oGDY9xBK5wRaB/FNvZzLm/50GIqJ0 QrXmPGzpTBalIG/vuQmDDAY3kUHIk7JIAUJQ4s/N6CM6r8kUkscMy5VokXhvVE3PUnK0 JjaVTo/kdoF9F6XuQPt+JoGByPGDde0A8WnqR4lCJG8d59k+8Tv6gnz0kms7vYeCOvNT CotfZZblsuQFCEuI5IDPq32yBbPCJ1OzriU95Xy2gG93FhEPv/mFwn2OnD6Ti4BwQSEp 20ogxNn1vc5DVHuDf448l93SWIkP2rKVT14RCwZepJJCpqDsP8L0rrVjAr5e3zewZkPR 4BTg== 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 f3-v6si9724879plb.717.2018.03.23.18.49.28; Fri, 23 Mar 2018 18:49:55 -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 S1751832AbeCXBsG (ORCPT + 99 others); Fri, 23 Mar 2018 21:48:06 -0400 Received: from foss.arm.com ([217.140.101.70]:57084 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751491AbeCXBsF (ORCPT ); Fri, 23 Mar 2018 21:48:05 -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 F305F80D; Fri, 23 Mar 2018 18:48:04 -0700 (PDT) Received: from queper01-VirtualBox (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 257743F487; Fri, 23 Mar 2018 18:48:00 -0700 (PDT) Date: Sat, 24 Mar 2018 01:47:58 +0000 From: Quentin Perret To: Joel Fernandes Cc: Patrick Bellasi , Dietmar Eggemann , LKML , Peter Zijlstra , Thara Gopinath , Linux PM , Morten Rasmussen , Chris Redpath , Valentin Schneider , "Rafael J . Wysocki" , Greg Kroah-Hartman , Vincent Guittot , Viresh Kumar , Todd Kjos Subject: Re: [RFC PATCH 5/6] sched/fair: Select an energy-efficient CPU on task wake-up Message-ID: <20180324014757.GC1317@queper01-VirtualBox> References: <20180320094312.24081-1-dietmar.eggemann@arm.com> <20180320094312.24081-6-dietmar.eggemann@arm.com> <20180322180623.GE13951@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 22 Mar 2018 at 13:19:03 (-0700), Joel Fernandes wrote: > On Thu, Mar 22, 2018 at 11:06 AM, Patrick Bellasi > wrote: [...] > >> > @@ -6555,6 +6613,14 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f > >> > break; > >> > } > >> > > >> > + /* > >> > + * Energy-aware task placement is performed on the highest > >> > + * non-overutilized domain spanning over cpu and prev_cpu. > >> > + */ > >> > + if (want_energy && !sd_overutilized(tmp) && > >> > + cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) > >> > >> Shouldn't you check for the SD_ASYM_CPUCAPACITY flag here for tmp level? > > > > ... and this then should be covered by the previous check in > > wake_energy(), which sets want_energy. > > Right, but in a scenario which probably doesn't exist today where we > have both SD_ASYM_CPUCAPACITY and !SD_ASYM_CPUCAPACITY domains in the > hierarchy for which want_energy = 1, I was thinking if its more future > proof to check it and not make assumptions... So we can definitely have cases where SD_ASYM_CPUCAPACITY is not set at all sd levels. Today, on mobile systems, this flag is typically set only at DIE level for big.LITTLE platforms, and not at MC level. We enable EAS if we find _at least_ one domain that has this flag in the hierarchy, just to make sure we don't enable EAS for symmetric platform. It's just a way to check a property about the topology when EAS starts, not really a way to actually select the sd at which we do scheduling at runtime. I hope that helps ! Thanks, Quentin