Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp647510imu; Tue, 27 Nov 2018 04:21:07 -0800 (PST) X-Google-Smtp-Source: AJdET5fN/++0ejnDj8YqqLRkqpDcXAUaiga2JfpqO7nDm0hXdZbtrz/boiHuR1eDK4cIEEnejxT9 X-Received: by 2002:a62:1212:: with SMTP id a18mr33658813pfj.217.1543321267542; Tue, 27 Nov 2018 04:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543321267; cv=none; d=google.com; s=arc-20160816; b=KoMovQWobO1x+Rc14/aLynkYrSetZz1ifSbyw5dGJomVPX8JqnIYFzh+jcpWAtiRwp E8uHFnnc8PKIJVJWcQuaguOVNdnnlwlSpCXLZuFPGIwoDMP/jno2IqcMN3H78XW1UYju iEEsDtPp5wO3qf8fbTTmlKX7IN9Y6NdwC+O9Yu663dZvRQsq2yXUe9mgrdOz7fPE03nR yzCOjh2X4/Av53kQF0oEaNJxa7+N/bm7JNeSlVVhnlsLGO4pyVcp98kus7ypZuTvkYvi F7sMaDwcaKZ1ezvXxpmbPpA2lVKPbVEn9RireXdhTkTBGDriETVQk55sYjqPw3uea4A8 sVnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=O/D9kbnAYZwk5S050zq7rQZlhZQPJhRryIL1wLBWUrU=; b=uTNTzC2ApuNcB9oNDVwbpzFb50hKYU1kew3EempKLUeBSf6OFt/fmOhTEMC63h8NK7 iP8z/3CheJywH1msXonhl9utXwb0cjiLB0q03drSO3PdNGg9DDy2d1/T+aBzEBN1nyDd dAloadojfoAv/QewFY1gYG3rrPetQmnlRKH+kt59g595cmEfXCh/hgNw+dC+g5yh65D/ PQsKd2WRMygqUGn44PUhccUvbxcv8euRj56qsO3xBr7hCetkFllmdQQY4bnfYipvTi7y ypw5/FEXFuOF0CekqCnWS/c7S/lxDHDEVvK6lKh5Ss+BNGNkQLt5jAHbt0bkfCZcH/YV /AEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=foFl1T1d; 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 j11si3662940plb.253.2018.11.27.04.20.39; Tue, 27 Nov 2018 04:21: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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=foFl1T1d; 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 S1730973AbeK0V6y (ORCPT + 99 others); Tue, 27 Nov 2018 16:58:54 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34591 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728971AbeK0V6y (ORCPT ); Tue, 27 Nov 2018 16:58:54 -0500 Received: by mail-ed1-f67.google.com with SMTP id b3so18626986ede.1 for ; Tue, 27 Nov 2018 03:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=O/D9kbnAYZwk5S050zq7rQZlhZQPJhRryIL1wLBWUrU=; b=foFl1T1d1YXalNJRZ86A5IWZmeBSFcZTCOPtU4kgzcXHOtsavw3kQMR2sWnzMniaSL zFx8hX0MUsHePoROzuMHSYYOqcSa66WoVay2Ef6M44hDcppxW58rBZRjGwmIzhaIGGif lHAvvjiY3g6fSp7o8FHll0DpvdCaa8/6HTDi8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O/D9kbnAYZwk5S050zq7rQZlhZQPJhRryIL1wLBWUrU=; b=DUrEsNEzhQ+tw1ENDWK6wTREr1pWzlRYhiLf5CwOM93/tGXmo2puVf7Uu4KjDruWMG CBj2YwBNM95qSzLPDkCMiTI1rfRQUBd5+acHVFTrgxQlwUkQfK0Izc6o1TAfDNLImUbz fmBodoiXuA7b3M5o+BCkEhkBTVZNn6lnTjiUnLqy3JXRvNGHOxLgEGFIlRq6TT4o4Wk1 UG3j5FlH9ByZXzu7KKMF9+9R5VMTd9B413xTLImal+dy1ThGf4X6oiYOXmtprh5Lweo8 C8jaCdy7T66pOgpj//aVCEX0aTEnDG3A2sdxD7NolHUm/3xP9cHQbeqIumooZKuOONeT 4clA== X-Gm-Message-State: AA+aEWZYgDZcy1XinQ8D7RFGFKmiRYcwgzSvd+Z/RC8lImIBsYXYN8uD 8UqW8ERvV/rQAuvaBFQQvCZe+tyhpJqXVQ== X-Received: by 2002:a50:bb08:: with SMTP id y8mr26826227ede.10.1543316481034; Tue, 27 Nov 2018 03:01:21 -0800 (PST) Received: from andrea.amarulasolutions.com (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id s27-v6sm519172ejm.14.2018.11.27.03.01.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 03:01:20 -0800 (PST) From: Andrea Parri To: linux-kernel@vger.kernel.org Cc: Andrea Parri , Ingo Molnar , Peter Zijlstra , Vincent Guittot Subject: [PATCH] sched/fair: Clean up comment in nohz_idle_balance() Date: Tue, 27 Nov 2018 12:01:10 +0100 Message-Id: <20181127110110.5533-1-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Vincent Guittot --- 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 ac855b2f47746..db514993565b2 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; -- 2.17.1