From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5109EC433E9 for ; Wed, 3 Mar 2021 14:33:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 234B064EEA for ; Wed, 3 Mar 2021 14:33:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383324AbhCCObK (ORCPT ); Wed, 3 Mar 2021 09:31:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1842969AbhCCKXL (ORCPT ); Wed, 3 Mar 2021 05:23:11 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFFB8C08EC2C; Wed, 3 Mar 2021 01:49:38 -0800 (PST) Date: Wed, 03 Mar 2021 09:49:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1614764976; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T/A0o3BrWwxHFCgmVIMQGpakIiLM/ChkfyWO3Ef/TA8=; b=nqz3m0130PIKihgFX/e4X9Nvj1Aba2heHbnz6Yj4tyvHa1FAj7Ij+8e5jeV0j4qx4M3Dci eoIFu+KFR5lUFpFwj/bAzK5yOOdnEZecryXJR/jDpTUACrKf/MhlZLxSu/u6IB+yzpzJVS fqWIjp5YKmze7Sq/P61LHc0r7j7JaSQexc01Rh9vsOAjDi/mOf1rF02GFuU48GIMhjtYtf zFyuW64h1TQcEG+qeCOkpwGV7qUbZGuxcA9+dPlode15eWZ/NYHHJF/bDq10Dwc8B0vlvh Q99XSvthFju8vHLFVPQlELPVt37edlSrF4JKbCKd7r34qxBZe7M/Oh7qcrPUfg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1614764976; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T/A0o3BrWwxHFCgmVIMQGpakIiLM/ChkfyWO3Ef/TA8=; b=WBVmzePQukWpTUtnQEEaCdDS0170LYm1KXO2797vii1XRk0JVTbUhegabK2WtHNu4PbWA6 9XIN17AR1j98RjBg== From: "tip-bot2 for Vincent Donnefort" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: use lsub_positive in cpu_util_next() Cc: Vincent Donnefort , "Peter Zijlstra (Intel)" , Quentin Perret , Dietmar Eggemann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210225083612.1113823-3-vincent.donnefort@arm.com> References: <20210225083612.1113823-3-vincent.donnefort@arm.com> MIME-Version: 1.0 Message-ID: <161476497604.20312.18168364785560763796.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: b641a8b52c6162172ca31590510569eaadcd5e49 Gitweb: https://git.kernel.org/tip/b641a8b52c6162172ca31590510569eaadcd5e49 Author: Vincent Donnefort AuthorDate: Thu, 25 Feb 2021 08:36:12 Committer: Peter Zijlstra CommitterDate: Wed, 03 Mar 2021 10:33:00 +01:00 sched/fair: use lsub_positive in cpu_util_next() The sub_positive local version is saving an explicit load-store and is enough for the cpu_util_next() usage. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Quentin Perret Reviewed-by: Dietmar Eggemann Link: https://lkml.kernel.org/r/20210225083612.1113823-3-vincent.donnefort@arm.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b994db9..7b2fac0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6471,7 +6471,7 @@ static unsigned long cpu_util_next(int cpu, struct task_struct *p, int dst_cpu) * util_avg should already be correct. */ if (task_cpu(p) == cpu && dst_cpu != cpu) - sub_positive(&util, task_util(p)); + lsub_positive(&util, task_util(p)); else if (task_cpu(p) != cpu && dst_cpu == cpu) util += task_util(p);