Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp820209imu; Tue, 27 Nov 2018 06:46:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/WcV2MLmyKp0UQG6NAqsVFsBrJHSCPUyLth64AtFuCslvNNCn5ZPxwbeP7fJrAF2pqZC8qW X-Received: by 2002:a63:db48:: with SMTP id x8mr28549597pgi.365.1543330017597; Tue, 27 Nov 2018 06:46:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543330017; cv=none; d=google.com; s=arc-20160816; b=yu+SaQkAo72WKsT0dahl/aZz8/e8CvpUiKaJkw4HWMxVGpm1dsirb/4gVTMo+s/bua h7DDNILwn9zuOeyb/K6BwCA7jqVDTbkIillkuOSznOdN5oP6XXckZmLbLQhtsLDB4UL5 PrywSHs4q+nsc4nT8iOHwAy3/QnoUq8aVNgYEb1ni9nMTXHROIQjHdTGQqEvJBp2J7kq XkyM7OYkNsR9TQKyFnXuRCrUn8/6p2p+hxFMQ+E+ih/a6CyvGeq46vyyRr0upeiPGhFl qTtsIJhHj5lYp0o+/5E3/L8up8xphHQgT2OUS27zvb7AxveL31tu2+ItzgnHdAPYXFB6 5y8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KCHEkNC4dGIlSYb1h4I+F3i1uCKg+uB889KyiF59RLE=; b=XaSlXP0zu8/8B/w26+K1YZubvV/u9caLh6Jyq9qHw7xNmCMPUyBP79NhNQExau7yMN hq7wBrOGgX4WNolPuoCgBQlOyGfFGzZZlWn7pjaLXW478hgwBs/rAONbbJagP5jH6uqp bzYtv5PIBXJnxD7BErm3zVBQL+ClnzB4vtsb8vHaHX3lscO3V+XINWzg12SVe6rujdeY 9c+qZW0HCsteJ2Kytr3e1Lpc/K1hyi+wtGMaabd+3q/r9E9lJY8YnMMaPCap6cvCuF1Z 7yZuJ/mVslYopR879REUg9th1CUdGiOaSd7dNjVyFJecqdTEZ6P/Ga4Jjlk42BNIRBHn FvJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WQc3jIBB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11si4023642pgj.373.2018.11.27.06.46.11; Tue, 27 Nov 2018 06:46:57 -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=@linaro.org header.s=google header.b=WQc3jIBB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbeK1BkD (ORCPT + 99 others); Tue, 27 Nov 2018 20:40:03 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:35697 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeK1BkD (ORCPT ); Tue, 27 Nov 2018 20:40:03 -0500 Received: by mail-it1-f195.google.com with SMTP id p197so8689432itp.0 for ; Tue, 27 Nov 2018 06:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KCHEkNC4dGIlSYb1h4I+F3i1uCKg+uB889KyiF59RLE=; b=WQc3jIBBdoMaWkwihJNqnVO1yD/XUST5VaJDK5lU5eW6l+2qcSXSn3xnK1utkD997F LVeHgIEXFZ6pF5OD7lp4pZMxnTQFx4GQ9zVjTULM5mz1adXbNBLFYw0TzeX0tHL7T/B+ x4274+ytl7O3LrkwiEndpJC/3XR0X+TYC6ijk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KCHEkNC4dGIlSYb1h4I+F3i1uCKg+uB889KyiF59RLE=; b=gExJMCTbr5gcGNF0pbyzv3mkyf2Ll0kh44kv9sN8jeiNzlce2srKLu00yNnROVSVxn bi1pqmZ3YOFINJGdzdPbFcizF3nCtc7H0bRdOrS7qr9ynVVUdh3H4klnJoQzG4z4Age5 ysAEAKPC+c44lqasbsFmOZNSvRq6k98ZcVDK4huQidXG0andORXVw1mlQIGPxFh6vHnk RH00GGzCpPpMT0sx2E3DpGuscir4eLEopntMy4EEj/OWlUVbNgD5ZuJAroMZG0UpJ1SL yWFvjnAxURgXZ28dPZ5yGUc0mg4EnX9EpDKOZ2VPWgRQ9ulDAUXIY3mbE2LT4MiNqRXD QN/A== X-Gm-Message-State: AGRZ1gKz16m8jGisFe3BMqCYQUxJx8n09Gh3GrjVUtIdHYjBAYLyt5yf MFOCyASTYxGrrEu6GzI15ztCLPnAEw29B7hvQSdcZg== X-Received: by 2002:a02:a1dc:: with SMTP id o28mr29618940jah.20.1543329713967; Tue, 27 Nov 2018 06:41:53 -0800 (PST) MIME-Version: 1.0 References: <20181127110110.5533-1-andrea.parri@amarulasolutions.com> In-Reply-To: <20181127110110.5533-1-andrea.parri@amarulasolutions.com> From: Vincent Guittot Date: Tue, 27 Nov 2018 15:41:42 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: Clean up comment in nohz_idle_balance() To: andrea.parri@amarulasolutions.com Cc: linux-kernel , Ingo Molnar , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Nov 2018 at 12:01, Andrea Parri wrote: > > 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 Looks good to me > --- > 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 >