Received: by 10.213.65.68 with SMTP id h4csp158987imn; Sat, 24 Mar 2018 17:13:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELuufNZByDbzCG4TK3v6QXanMa7Ef6mbfNpKBfq2vPWSdw/oBMxZrWIuN6/KONxqb1ZXmGeo X-Received: by 2002:a17:902:8d92:: with SMTP id v18-v6mr34918684plo.21.1521936813626; Sat, 24 Mar 2018 17:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521936813; cv=none; d=google.com; s=arc-20160816; b=GC9UGV/ykATEq6O9HM8XKsFWRfzBdH0YPfm9E+oQYcXwhntv2V/+TsSf3xsxWtk/LA Nd8C5edS8cpgsh6Pq+S2FUhowPBqGC4LUFIIwzPYYqDYMkTmi9PhPPixlkaHCnDMIipt zg5sPUVcuxcGHxhBVkYMSA6cG5ttdos6Dk1EnyiVNh0g1qE/nDYfI0bVn5OFqRqgQT1N IS3ks78LT3ItvzXgZ2fV55NjcjJpPKG9euMNU94N3jUeazJpP6LlS7vo3zCSDotIs3pV PlAva1/inFQImS8398Fnyp4IbeR/TcoONgVHNpYUSU2LhwFYsHNBYQMkdeRkMS7PcsD3 Bp3w== 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=JZvNnb5hENdS5DcCL7+X22Cblh2fGwDmQxtZtirFia0=; b=NfqS/o1CdKFrX7gPMDuTA7dt/xJW2dwjlmfblC//RNHS2i6z4J5wy4iIqpXnFjBG6k oOa0+T2Xc/uBLcJg8Rgl3Ooa2m82+eMxCx7XO6WrV5BLbbEjsWh3n8PoRNm5RUbC7t9E 954j3o2gNNwNG7AW1AcUtdKKorSfpDf/huC8wXav0ur9VedJ6vlgOX2bu3uYakODBhaI y1t5di57C1AZHjhWI5flHFHPwkLOzLo4WqgS6tS7rhv1eWLRnKUAfI3q0t30/V9TPX0v x4OY+rzp5KTI72YkI+tqYhSAwLvcukFOnJo9crknOceYD3KBRsDRwOTCA7jM2px1C41/ p4Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vaUz3vdo; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si2592807plr.42.2018.03.24.17.13.18; Sat, 24 Mar 2018 17:13:33 -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=@google.com header.s=20161025 header.b=vaUz3vdo; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbeCYAMZ (ORCPT + 99 others); Sat, 24 Mar 2018 20:12:25 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:40890 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbeCYAMX (ORCPT ); Sat, 24 Mar 2018 20:12:23 -0400 Received: by mail-it0-f41.google.com with SMTP id y20-v6so6712969itc.5 for ; Sat, 24 Mar 2018 17:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JZvNnb5hENdS5DcCL7+X22Cblh2fGwDmQxtZtirFia0=; b=vaUz3vdoTD9cmC/mzIndmK+qynsrk0q78nQJL/GuLV/zkETXNRIyDRmBBYZ/JZN2Qe +4f8khylVaHJVaSAgDFr+XbdbS5UTpGtrym5wQGROUr3HslaT6S7F1tTQrOLdn9pU6Xq lN/gj307v9Qvma14xSuy1lxFkyV/u+JacFu37IMLVXkruurXVpL/fcTWwGIQcfsoNw/3 RWrNoj87Y1qO5INg8lD1p3JJp4OKvtBLMeGB2+x+bbgIot2mfuvANmDjMh37z8slnoZc 4kBmvFyhqbuXE7XWIONvyQTNwM7w4LOdW7gE4FXEoB4gLtxUiHP0WB52ZlT4UdVntHK5 l3Ig== 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=JZvNnb5hENdS5DcCL7+X22Cblh2fGwDmQxtZtirFia0=; b=fOI5z1POcBBHojSdMb4eP1xFDxbARcgbqHFF8zUjXg4MYfiS56MAag9sMREagGbtvV yU9SkmTMKRvfP9orijZ7gd3X3XMA0KFPTq9d1Xs48GqSvD1TcQZUP0AKSMaDBIOqkvWw 3+ns0g1huj7P1nLtf3UNsMRL+DPgq8/8IBPFBhvQJ7CxYvd0S75YFfkdd/tlOG3YONPm W6BoZoVyL+HChtuL3YI8h+IhsDEo0i7DkE5xfEN5rGPi2gzSQ8f2XGc2fV4+ETuNsfOy uOK1IGhLcHoIgHej+161+fJEK4cRS+ei7GpsJqxVY2Rf46wMD2RMz/hviRUN3So+AtnK w+Xw== X-Gm-Message-State: AElRT7E1auTKOv28A/zjpmD1COPzW/jsdkPUMse6qOlfYug87ryXYTaD 3AbtIsO2eF2p3zgKLSfuhdeJ/2d2B/x0PLPvnzIZiN/E X-Received: by 2002:a24:a445:: with SMTP id v5-v6mr6066998iti.126.1521936741807; Sat, 24 Mar 2018 17:12:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.11.158 with HTTP; Sat, 24 Mar 2018 17:12:20 -0700 (PDT) In-Reply-To: <20180324014757.GC1317@queper01-VirtualBox> References: <20180320094312.24081-1-dietmar.eggemann@arm.com> <20180320094312.24081-6-dietmar.eggemann@arm.com> <20180322180623.GE13951@e110439-lin> <20180324014757.GC1317@queper01-VirtualBox> From: Joel Fernandes Date: Sat, 24 Mar 2018 17:12:20 -0700 Message-ID: Subject: Re: [RFC PATCH 5/6] sched/fair: Select an energy-efficient CPU on task wake-up To: Quentin Perret 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 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 Fri, Mar 23, 2018 at 6:47 PM, Quentin Perret wrote: > 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. Yes Ok you're right we do have the ASYM flag set at some sd levels but not others at the moment. Sorry about the hasty comment. I understand what you're doing now, I am Ok with that. thanks, - Joel