Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp5146531pjo; Tue, 11 Feb 2020 04:53:08 -0800 (PST) X-Google-Smtp-Source: APXvYqx6Vki6sOA/d95yo1wP00IEmhAtAdnydq+Hlgg/MZJPexxuJfEC7qi5jNiGfXjP0IX9AGFI X-Received: by 2002:aca:be56:: with SMTP id o83mr2801435oif.25.1581425587896; Tue, 11 Feb 2020 04:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581425587; cv=none; d=google.com; s=arc-20160816; b=zv/q6E3QC48J6HTMPKEYv3UUmhoG2M40Nti4R20lD2zfuCNvPi48fYFdEzreXoBDAF qLXi/ctFbTPgx/z5FMPLczH7WW8YNn7SXvXcXOn9E/onG06YvF2E9y4YsmXPbbtX35Qw bd8rLwHU1nVZtKGH1qrvYXrbAP7GKAJhcpoAClFYGhSNQ4zDqLisfzjPSANEKvfYbjCv 9VBlaRGepmzciVgA5nzrojYksMxq+V+q2/Q4x/rkPcxV/f/m7q4FqBwG3X4Tizy7Smhk 4oroR3mzY7hNHK4AJhHv3k/9IoIUsHQHDRE6oz/E7/CB69RW55GZ6aRrY681roNnaRgb x4IA== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=sP12BZHOZABUW9LqOEMr8bZA00EyZKNrZzrBzKKdaaA=; b=ibkWdUvI1u7SrRmGD5lfn6CtlRM+6BqdWJ0t/ejzTxwLvTU/zH1c+zW2GmF+lLG4zq Ag8kSttN8SaxBwNQ2vMninByMSDmUxhP6hhXgnXQL0nrsSqjoZPhao+NAVvsxhzVJeoF 08VQBl1hm2ZiGH8ASR1mC1nZEdeTZ2+WuP2TkrlhV4a30KyhN0iFTHnWYimgXqYx/HaZ TxAsRhUxxAfdgQ8457dsKgGsfZ9WehoTF8eHHjOEaeqFGoT3ESFw8Uf3aN4nFD42eT84 PReHj+yGPqi89QFp9ST91a2/3FmRuaIiWtqqCUeRpjfgk1mdIUrMJ+V917UEGxoeFlFM bH9A== 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 x16si1918468otk.13.2020.02.11.04.52.56; Tue, 11 Feb 2020 04:53:07 -0800 (PST) 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 S1729177AbgBKMtj (ORCPT + 99 others); Tue, 11 Feb 2020 07:49:39 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45994 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728541AbgBKMry (ORCPT ); Tue, 11 Feb 2020 07:47:54 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j1UxB-0007bl-2i; Tue, 11 Feb 2020 13:47:49 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id B1AF61C201A; Tue, 11 Feb 2020 13:47:48 +0100 (CET) Date: Tue, 11 Feb 2020 12:47:48 -0000 From: "tip-bot2 for Morten Rasmussen" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Remove wake_cap() Cc: Morten Rasmussen , Valentin Schneider , "Peter Zijlstra (Intel)" , Ingo Molnar , x86 , LKML In-Reply-To: <20200206191957.12325-5-valentin.schneider@arm.com> References: <20200206191957.12325-5-valentin.schneider@arm.com> MIME-Version: 1.0 Message-ID: <158142526837.411.5720078180177527135.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 25ac227a25ac946e0356772012398cd1710a8bab Gitweb: https://git.kernel.org/tip/25ac227a25ac946e0356772012398cd1710a8bab Author: Morten Rasmussen AuthorDate: Thu, 06 Feb 2020 19:19:57 Committer: Ingo Molnar CommitterDate: Tue, 11 Feb 2020 13:04:16 +01:00 sched/fair: Remove wake_cap() Capacity-awareness in the wake-up path previously involved disabling wake_affine in certain scenarios. We have just made select_idle_sibling() capacity-aware, so this isn't needed anymore. Remove wake_cap() entirely. Signed-off-by: Morten Rasmussen [Changelog tweaks] Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) [Changelog tweaks] Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200206191957.12325-5-valentin.schneider@arm.com --- kernel/sched/fair.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6fb47a2..a7e11b1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6146,33 +6146,6 @@ static unsigned long cpu_util_without(int cpu, struct task_struct *p) } /* - * Disable WAKE_AFFINE in the case where task @p doesn't fit in the - * capacity of either the waking CPU @cpu or the previous CPU @prev_cpu. - * - * In that case WAKE_AFFINE doesn't make sense and we'll let - * BALANCE_WAKE sort things out. - */ -static int wake_cap(struct task_struct *p, int cpu, int prev_cpu) -{ - long min_cap, max_cap; - - if (!static_branch_unlikely(&sched_asym_cpucapacity)) - return 0; - - min_cap = min(capacity_orig_of(prev_cpu), capacity_orig_of(cpu)); - max_cap = cpu_rq(cpu)->rd->max_cpu_capacity; - - /* Minimum capacity is close to max, no need to abort wake_affine */ - if (max_cap - min_cap < max_cap >> 3) - return 0; - - /* Bring task utilization in sync with prev_cpu */ - sync_entity_load_avg(&p->se); - - return !task_fits_capacity(p, min_cap); -} - -/* * Predicts what cpu_util(@cpu) would return if @p was migrated (and enqueued) * to @dst_cpu. */ @@ -6436,8 +6409,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f new_cpu = prev_cpu; } - want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) && - cpumask_test_cpu(cpu, p->cpus_ptr); + want_affine = !wake_wide(p) && cpumask_test_cpu(cpu, p->cpus_ptr); } rcu_read_lock();