Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp812468ybh; Wed, 11 Mar 2020 11:19:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtlZHHLEMYtZgI1OYCtQieBMzES0vaxTVi9wsl7rZeAsNT4n0cSOuhrjnBX2XBKC8W5BfoI X-Received: by 2002:aca:5ed4:: with SMTP id s203mr1263oib.102.1583950753596; Wed, 11 Mar 2020 11:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583950753; cv=none; d=google.com; s=arc-20160816; b=MW/3v0NPLHfkV96oyv6KjiGiYAQItKWg8qHUNHX19UQ/rls3iitA4T3BBkDbbnWtEC zi3McvOW5K34HHLWWGpjDg9voMGP3zlwlc7J16ZgtBcWCQESyWeCRaN9glbbQSAHEERs 9Cyb5ZL5FNgg5eh57sgXZvKAaHAbm3T40DKMQnJG3MDLL6zAoEwwFCiwTZxLCpxNBrAM bJMe1YkxOE1BRvDjO9JIRtF3RZLa6HHUqj84w+VedMatFjQNViczcQdMmO0PgEtfPNrz 2ZlS7Muy4kUxCGggT2eRy08AVFThIhNQTUdEDk0hCM0fIfkN12W7RvHWQ5HAiv6sPeuL mTUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yMxZWRkL9MQBGKKKuMCM5HkzJey29+4qsz/zShz7S8s=; b=AKj/0KNv8Za0IOKqBDGHqR+715FEIDu6igsZzTyLk10CAXreIM0WyU3SL7Mgh9wswe FhYI9RtmG5xX7kKEimtnPY8Xj1fqiGiJEp9tdNXqjfSTdkDAzIudh0nFO3KdllAD3PYS WuDGAXcCPw7I6kXkIpKzFdCNzKlcX/wx/JgcXYAer+1x9wFfGYWQUpdi5IwMAb/oUS4k uyJekyondR0nSvligF9CF/RcdbYPqfHcYDfVbR7LzJLc2Hkj19jrgtrAiPfdauIz9Rq2 mS5wcATIc036Gp+u+FKrdSvr88WgyUQEALbwt1kZShBwC/QSnwxT7NsvOrIINGRTNs22 PoWA== 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 m2si455209oof.17.2020.03.11.11.19.00; Wed, 11 Mar 2020 11:19:13 -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 S1730857AbgCKSRK (ORCPT + 99 others); Wed, 11 Mar 2020 14:17:10 -0400 Received: from foss.arm.com ([217.140.110.172]:53256 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730834AbgCKSRE (ORCPT ); Wed, 11 Mar 2020 14:17:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D561E1045; Wed, 11 Mar 2020 11:17:03 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F1A4C3F6CF; Wed, 11 Mar 2020 11:17:02 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com Subject: [PATCH v2 7/9] sched/fair: Dissociate wakeup decisions from SD flag value Date: Wed, 11 Mar 2020 18:15:59 +0000 Message-Id: <20200311181601.18314-8-valentin.schneider@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200311181601.18314-1-valentin.schneider@arm.com> References: <20200311181601.18314-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CFS wakeup code will only ever go through EAS / its fast path on "regular" wakeups (i.e. not on forks or execs). These are currently gated by a check against 'sd_flag', which would be SD_BALANCE_WAKE at wakeup. However, we now have a flag that explicitly tells us whether a wakeup is a "regular" one, so hinge those conditions on that flag instead. Signed-off-by: Valentin Schneider --- kernel/sched/fair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 920c4e2ce0d1..f98dac0c7f82 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6606,7 +6606,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags) sd_flag = SD_BALANCE_EXEC; } - if (sd_flag & SD_BALANCE_WAKE) { + if (wake_flags & WF_TTWU) { record_wakee(p); if (sched_energy_enabled()) { @@ -6643,9 +6643,8 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags) if (unlikely(sd)) { /* Slow path */ new_cpu = find_idlest_cpu(sd, p, cpu, prev_cpu, sd_flag); - } else if (sd_flag & SD_BALANCE_WAKE) { /* XXX always ? */ + } else if (wake_flags & WF_TTWU) { /* XXX always ? */ /* Fast path */ - new_cpu = select_idle_sibling(p, prev_cpu, new_cpu); if (want_affine) -- 2.24.0