Received: by 10.223.176.5 with SMTP id f5csp463005wra; Fri, 9 Feb 2018 01:53:00 -0800 (PST) X-Google-Smtp-Source: AH8x226YjnqU4vYIOLUixTz8q1OFnNlT42GB2FZ9TRlhKpvwkuqgERgUA8WRtTLpE/5O47+hGlg9 X-Received: by 2002:a17:902:7c18:: with SMTP id x24-v6mr1994161pll.432.1518169979901; Fri, 09 Feb 2018 01:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518169979; cv=none; d=google.com; s=arc-20160816; b=TF9Fyo4xRL8RFRuC7oe1aOtTM9YpCECzIJLbboY/RPRpBkXfwaY7IcAmnkfKKM5H3r NU8HLW3Hj3DB5EhthvuJAQsqmbRI+mtQWdUOjGhgC79nh9cFDFnyLxIT0nqG0sdU7buP XHH+eyG/YsLPEaPt9qlIq498RVxhtsrJWEkKuRRiQ3I7kFPKsmN+x7eMH/3rpXWjiKAn I3SfCGFAExvsGbRgF+UVH9urjupPl25YPhLwDXkOJEBrUg+TVt4oOhgn0RjZXwITyfmr ymIlGHVO3iL+0b5wQ269LZpwQ9E0ktVqSssNZvk4De/j5AtVoxxn6BLUccVORX2exs5T ZV4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=f5pAdR8HaIWKL7McYvgCSoQa4bywZmTk59NijAAKQeo=; b=oRIPBEii94FjGGLbAnPPqJaurgOEDDCuJopkc2NZgo9FFbazc5l7t/GfOC5CLhprul 88kBIk9hjO/HgzBougvt6H5vt6YamnTSBFoCbB7zGzGZFJoYv7hMR3EZhbuQ7iFWBpfg ykjjqogZm3DoFcq7mu3GW9t34wI3/WEgkfMYwB6nYmwcsSWaDIDJ/SzzQtUYKh9k9OaD XzcSycdGHSIzTWv9s6bRkBp1tnmTyWauoT8If24kIKNn1+tW4Bltg424REjE+2xD2Fvs doacxi65JXPPjVdYf++nOPolewAwaYJji9B/ybYMHYCybRiwFwg0WHTmX4GXu07llVPP ynNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jba8X2RP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14-v6si1325416plm.20.2018.02.09.01.52.45; Fri, 09 Feb 2018 01:52:59 -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=@gmail.com header.s=20161025 header.b=Jba8X2RP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751024AbeBIJvf (ORCPT + 99 others); Fri, 9 Feb 2018 04:51:35 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:41618 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbeBIJvd (ORCPT ); Fri, 9 Feb 2018 04:51:33 -0500 Received: by mail-wr0-f194.google.com with SMTP id u60so4844382wrb.8 for ; Fri, 09 Feb 2018 01:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f5pAdR8HaIWKL7McYvgCSoQa4bywZmTk59NijAAKQeo=; b=Jba8X2RPdOMaJSZUvfoKth9mV+4z+PYN6ET5wNy6kQdHfr2YY2q20SQDKHXWBpS4ET xh00PGKDQVK2/KcAjJMXSBiAOHtlhDpEIE53X6AHFhylQMzzSTEuNvRrwpuzZ+yGdf94 FsTWX55DleHOdWgysd2iLOg5QjptfHGN1ecvcZSmDyJhz/rV4JoNbCXFLWkIji9FooYS A6k4tvF8NYxDLmT91MgX/VxAoQYgPuJakV8I67OeT/9lomUgZd6xgUU+Xd/36YXBLbb+ RE3gCK5k915pgL8PYJJcJiITI087e27apimANznNzEWHvgY9BklBKNaht0NRl9fcxnRP 4vvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f5pAdR8HaIWKL7McYvgCSoQa4bywZmTk59NijAAKQeo=; b=hw3b/Mh3zNj4GrbJ3D03y0qQdn9PZ0E0mm2vSHFnmEwoo9+5z6f59HZlTYeawKMOJu RFO23x1sESRBXnbvkzX6CZkKh7cHGmBj5x3Vu91A85KZIGQmXtF0UWGTDma0/tsK6kXm yzcpwu1dH8kuIF/i1tauEE5CXgTQKcwemkEI4Ej5IrH58weUEpbvewCHd5OCzneRs7sy JmVSlcqSvBBfGqJE87D0CT4OkLI2/97W53+OpoIXsBSM9BmKV5Flr2xA1fTGYH0BUPf2 r95c0lhciFnPoynuRUY9ZH/cY1glUPeFotTsrjfQ0uOBEU5a5NH3An8CSEZo/aqItCMl kflA== X-Gm-Message-State: APf1xPDPtykyJZWKuj7EyZ2Vet93B1ZHEE5JsFbYn28ClkWfj1uYRFOL R8C7Y3uZXgYwp+f7xOwvs84= X-Received: by 10.223.135.18 with SMTP id a18mr1803174wra.126.1518169891926; Fri, 09 Feb 2018 01:51:31 -0800 (PST) Received: from andrea (86.100.broadband17.iol.cz. [109.80.100.86]) by smtp.gmail.com with ESMTPSA id 2sm1674006wra.58.2018.02.09.01.51.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 01:51:31 -0800 (PST) Date: Fri, 9 Feb 2018 10:51:25 +0100 From: Andrea Parri To: Will Deacon Cc: Peter Zijlstra , Vincent Guittot , mingo@kernel.org, linux-kernel@vger.kernel.org, valentin.schneider@arm.com, morten.rasmussen@foss.arm.com, brendan.jackman@arm.com, dietmar.eggemann@arm.com Subject: Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed Message-ID: <20180209095125.GA17357@andrea> References: <1517944987-343-1-git-send-email-vincent.guittot@linaro.org> <1517944987-343-2-git-send-email-vincent.guittot@linaro.org> <20180208140005.GH25201@hirez.programming.kicks-ass.net> <20180208153030.GB17775@arm.com> <20180208154643.GB25181@hirez.programming.kicks-ass.net> <20180208160341.GD17775@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180208160341.GD17775@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 08, 2018 at 04:03:41PM +0000, Will Deacon wrote: > On Thu, Feb 08, 2018 at 04:46:43PM +0100, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 03:30:31PM +0000, Will Deacon wrote: > > > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > > > > > Without this ordering I think it would be possible to loose has_blocked > > > > and not observe the CPU either. > > > > > > I had a quick look at this, and I think you're right. This looks very much > > > like an 'R'-shaped test, which means it's smp_mb() all round otherwise Power > > > will go wrong. That also means the smp_mb__after_atomic() in > > > nohz_balance_enter_idle *cannot* be an smp_wmb(), so you might want a > > > comment stating that explicitly. > > > > Thanks Will. BTW, where does that 'R' shape nomenclature come from? > > This is the first I've heard of it. > > I don't know where it originates from, but the imfamous "test6.pdf" has it: > > https://www.cl.cam.ac.uk/~pes20/ppc-supplemental/test6.pdf > > half way down the first page on the left. It says "needs sync+sync" which Indeed. As a curiosity: I've never _observed_ R+lwsync+sync (the lwsync separating the two writes), and other people who tried found the same http://moscova.inria.fr/~maranget/cats7/linux/hard.html#unseen http://www.cl.cam.ac.uk/~pes20/ppc-supplemental/ppc051.html#toc8 . It would be interesting to hear about different results ... ;-) Andrea > is about as bad as it gets for Power (compare with "2+2w", which gets away > with lwsync+lwsync). See also: > > http://materials.dagstuhl.de/files/16/16471/16471.DerekWilliams.Slides.pdf > > for a light-hearted, yet technically accurate story about the latter. > > Will