Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6902661ybf; Fri, 6 Mar 2020 06:44:40 -0800 (PST) X-Google-Smtp-Source: ADFU+vuELntl+KKOnvI/C+QQEgT1NqtwpxyaUkHkO2EKuStGUceN8vaulr3cnBouRMqmG9qkThj5 X-Received: by 2002:aca:130c:: with SMTP id e12mr2777603oii.122.1583505880649; Fri, 06 Mar 2020 06:44:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583505880; cv=none; d=google.com; s=arc-20160816; b=K4qefvwGXSWWS9g7i/Y/P0oJZyE7YXynVA8D9TaUDVImQivF9geF8GcbXC3dF8Ck2b aHzhR9ebedZZPpPXDELMPg2vSbC0Nq9PR7k1WRwxbY4Qm2yEBKn1sVuP+PM7mhq95ziT kYZZD6xCivrliyXaqFLmS55MIjjAwaFOLz0Ar04e2aOdOmHR5zg4XLvqBJKib0LGrtGp R081oAqUgc9tAxwXeOVm3nattYMqmrlljtpwrdDQrI3jOas+qOPr1SsGwI0817uu3Fg7 7pKakV8lsye9VpL8EAQ7WfsLF+ZGcu/2nbGVs6HEfTPG/z6a0VSv0tuiXRfZjHygDKtX tGMg== 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=U0NpLPuWSygKEEmxD6q6WEipX1W8boLprrK3Xs4hAQE=; b=Vb4XZUU5O1YamRmUsch0LY05ZPyln3h/TMPYXEyOpOob3Ni/R8JFQ2K6Eh9q9AAd6v QzlrG1F13zZ4AeWNLMhowW1AP+Cffs9IOyHMYtRRPEnqcbpq6Xi3Jlw1zbrSXHD6eaWy S+23xi+kp3R1y1/psxqhHSr0y5CR+4ErhD8AZx0lKeKJTmZhMeVsjnK0sb9KPO5LYGBs 7jp7Zy6jHupxRs6+/Hijz+EHmBp+1C/TdjU42d2fpzX91JtqBIgTdcMKmT3z71ZnfIP0 rr6RuNSuhduo5Vg+4OSI93PUSi9irDM4xTETvtPLVPDZu26PAT0zOrannOfSAJur+gEp i0uA== 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 l23si760113oii.20.2020.03.06.06.44.29; Fri, 06 Mar 2020 06:44:40 -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 S1727255AbgCFOnk (ORCPT + 99 others); Fri, 6 Mar 2020 09:43:40 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:53778 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbgCFOmO (ORCPT ); Fri, 6 Mar 2020 09:42:14 -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 1jAEAz-0006HP-F2; Fri, 06 Mar 2020 15:42:09 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 1CFE21C21D4; Fri, 6 Mar 2020 15:42:04 +0100 (CET) Date: Fri, 06 Mar 2020 14:42:03 -0000 From: "tip-bot2 for Qais Yousef" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/rt: Remove unnecessary push for unfit tasks Cc: Qais Yousef , "Peter Zijlstra (Intel)" , Ingo Molnar , x86 , LKML In-Reply-To: <20200302132721.8353-6-qais.yousef@arm.com> References: <20200302132721.8353-6-qais.yousef@arm.com> MIME-Version: 1.0 Message-ID: <158350572384.28353.8796340288964830522.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: d94a9df49069ba8ff7c4aaeca1229e6471a01a15 Gitweb: https://git.kernel.org/tip/d94a9df49069ba8ff7c4aaeca1229e6471a01a15 Author: Qais Yousef AuthorDate: Mon, 02 Mar 2020 13:27:20 Committer: Ingo Molnar CommitterDate: Fri, 06 Mar 2020 12:57:29 +01:00 sched/rt: Remove unnecessary push for unfit tasks In task_woken_rt() and switched_to_rto() we try trigger push-pull if the task is unfit. But the logic is found lacking because if the task was the only one running on the CPU, then rt_rq is not in overloaded state and won't trigger a push. The necessity of this logic was under a debate as well, a summary of the discussion can be found in the following thread: https://lore.kernel.org/lkml/20200226160247.iqvdakiqbakk2llz@e107158-lin.cambridge.arm.com/ Remove the logic for now until a better approach is agreed upon. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware") Link: https://lkml.kernel.org/r/20200302132721.8353-6-qais.yousef@arm.com --- kernel/sched/rt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index bcb1436..df11d88 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -2225,7 +2225,7 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p) (rq->curr->nr_cpus_allowed < 2 || rq->curr->prio <= p->prio); - if (need_to_push || !rt_task_fits_capacity(p, cpu_of(rq))) + if (need_to_push) push_rt_tasks(rq); } @@ -2297,10 +2297,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p) */ if (task_on_rq_queued(p) && rq->curr != p) { #ifdef CONFIG_SMP - bool need_to_push = rq->rt.overloaded || - !rt_task_fits_capacity(p, cpu_of(rq)); - - if (p->nr_cpus_allowed > 1 && need_to_push) + if (p->nr_cpus_allowed > 1 && rq->rt.overloaded) rt_queue_push_tasks(rq); #endif /* CONFIG_SMP */ if (p->prio < rq->curr->prio && cpu_online(cpu_of(rq)))