Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp785784imu; Tue, 11 Dec 2018 07:33:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/V+HbhxiKs9GqpZ/q/kEpKQuCeo0sBykCl4NRd65pnf+BVcgHwSQ0JppTB/rsnS9sn7p7hF X-Received: by 2002:a62:9fd9:: with SMTP id v86mr16650711pfk.191.1544542424484; Tue, 11 Dec 2018 07:33:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544542424; cv=none; d=google.com; s=arc-20160816; b=e3I0sqJF8MDqN5zutKeh7E+pQdG4XuZQFVX8O69Xs3Ver1CvQ0joBxe+uesLIWI6MP W9WzHoCWa6MtfTksp2Em4mB88reH3lL8sHcSOjsMfDdMRyXWFutzBArBSo8UITyg4o/I OGwU8AKLWItkYkBGNqCrb+bEkeoVARp1SM1DcOSry55TwMyUbLJEVC7hkLGnfD5+Ep2I zdFKDH8d5W1HFaZ8k7iRmAG9LNNXpUI7vKLOXOd3k1HLwKK1GM9CRFL3UKYSaLjNhBQ3 Z4lyt1M4WDyw2CN9GXWVneWApqCO2MFvFWv5FSUUg5DtsIf4djExLi+U/rBu93lnWxB1 EftA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=euhiL2akBqXNuFLZ1SjwwzfbGrSknA+ErldUeIGODYs=; b=ApfqVo3NC+9XHJIDOl0bEGMXoSDlJpR5yWWNDdPFO9sy12h58NkUVIB/PdyOX6usu1 oQcJ72rLqDSVIRdcQNtO+OOwVOQPyGE9fTaEi/vZjwhv642IA2wM9uDMfJvz08WKn6Cx A3F3Eh0gYhzeSA+ifUaSLzp9ySHAqKaTfWhfDRKv+pDYWLnnHVO65zBgVDxsevT34Igl tAZtw+LIH+tZb5UmC1pMCO7wnfqzAZ2Yi0zK3pcWwbmgBDqVMW2JWBTKHNKrOwI85S/4 abYmTnvKWnNqjnWa6r4HUCyk5bJXhbH86tblMKhVnTDsqz0qbObsO7JwHN3fSls/5Z1s 71kQ== 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 d10si12714443pgf.136.2018.12.11.07.33.28; Tue, 11 Dec 2018 07:33:44 -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 S1727082AbeLKPag (ORCPT + 99 others); Tue, 11 Dec 2018 10:30:36 -0500 Received: from terminus.zytor.com ([198.137.202.136]:45599 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726499AbeLKPaf (ORCPT ); Tue, 11 Dec 2018 10:30:35 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBBFUFLZ4041892 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 11 Dec 2018 07:30:15 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBBFUFep4041885; Tue, 11 Dec 2018 07:30:15 -0800 Date: Tue, 11 Dec 2018 07:30:15 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Andrea Parri Message-ID: Cc: andrea.parri@amarulasolutions.com, peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, vincent.guittot@linaro.org Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, vincent.guittot@linaro.org, andrea.parri@amarulasolutions.com, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com, torvalds@linux-foundation.org In-Reply-To: <20181127110110.5533-1-andrea.parri@amarulasolutions.com> References: <20181127110110.5533-1-andrea.parri@amarulasolutions.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] sched/fair: Clean up comment in nohz_idle_balance() Git-Commit-ID: 80eb865768703c0f85a0603762742ae1dedf21f0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 80eb865768703c0f85a0603762742ae1dedf21f0 Gitweb: https://git.kernel.org/tip/80eb865768703c0f85a0603762742ae1dedf21f0 Author: Andrea Parri AuthorDate: Tue, 27 Nov 2018 12:01:10 +0100 Committer: Ingo Molnar CommitDate: Tue, 11 Dec 2018 14:54:57 +0100 sched/fair: Clean up comment in nohz_idle_balance() Concerning the comment associated to the atomic_fetch_andnot() in nohz_idle_balance(), Vincent explains [1]: "[...] the comment is useless and can be removed [...] it was referring to a line code above the comment that was present in a previous iteration of the patchset. This line disappeared in final version but the comment has stayed." So remove the comment. Vincent also points out that the full ordering associated to the atomic_fetch_andnot() primitive could be relaxed, but this patch insists on the current more conservative/fully ordered solution: "Performance" isn't a concern, stay away from "correctness"/subtle relaxed (re)ordering if possible..., just make sure not to confuse the next reader with misleading/out-of-date comments. [1] http://lkml.kernel.org/r/CAKfTPtBjA-oCBRkO6__npQwL3+HLjzk7riCcPU1R7YdO-EpuZg@mail.gmail.com Suggested-by: Vincent Guittot Signed-off-by: Andrea Parri Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20181127110110.5533-1-andrea.parri@amarulasolutions.com Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ac855b2f4774..db514993565b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9533,9 +9533,7 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) return false; } - /* - * barrier, pairs with nohz_balance_enter_idle(), ensures ... - */ + /* could be _relaxed() */ flags = atomic_fetch_andnot(NOHZ_KICK_MASK, nohz_flags(this_cpu)); if (!(flags & NOHZ_KICK_MASK)) return false;