Received: by 10.223.176.5 with SMTP id f5csp2077632wra; Thu, 8 Feb 2018 08:06:43 -0800 (PST) X-Google-Smtp-Source: AH8x224OKcvXW/KzA37iea32XtL6fc5WyS97pVQtXdH6C0OaEzvgiOp0nw8VJODX8A73Sn/G4LjJ X-Received: by 10.99.172.2 with SMTP id v2mr925600pge.204.1518106003214; Thu, 08 Feb 2018 08:06:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518106003; cv=none; d=google.com; s=arc-20160816; b=Ul8Y1YtjMOrxDHgQ51u51J7I/biZ+aZhlHSmUOoVx8r3kD2hkMsfK5MrfYj7tidk98 7nCwnFH8KYPdkNB3hBa/W2iTel3ejmTdJimjR2bnCrSRg17guLovGHM4USeDhRXX5ctk 8Ozk+tdIC6rIDPicGS+AEoVTDXlsBlLk37H6QfQhD/N7rh+ChJB5lovihEN7GOse/HdC wVtooEvTVaPP70KT1JOLAWIJoEBYwTH0i+zwOk5W+gkqEyX+7/V6V5K3TuI79ssPxncx 0EjkxpGStF80t1ffgZIdkA0a3VeqOUrOjjwPocDpJD/yP1VT4jco9G/QeEZGhX81osCy GvBA== 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:arc-authentication-results; bh=dmlZ8jWXyuZJ9Koq6aRWt6cKoy8jujmA84C74bFYASc=; b=jAppalsy7irMXZAB6ZKdRMKCvfRdhDqCAC6VAcAoBxE3KE4tleobqrYZzTr1tP7JQr TWuiccQeLrdN4qgaL8lmzGTxupZW+G/pO/CS+nj5I4+jl8ptFmBC+cbMUQ/3FAkj5n0L adZcY7JEEy8Q/2gHouJY+OqB0+iesgZI7eaYEz+LrZ8HHPeoeAHp+ylwwug3+8HFnrQH /Z+Zmmj3yBWzTtbDWP2DV4+tMzGmdh+JVOOgHyqNG4IDsYbitz6eygcgtAy52A1cAaLy mJnuncHWLSIDpACbSk3P9bCc0KtcQywKWPegrasCiAv3b7ACP7tYjuqD2l/leoGOcWQ6 Vn9w== 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 q73si161262pfj.270.2018.02.08.08.06.27; Thu, 08 Feb 2018 08:06:43 -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 S1752159AbeBHQDx (ORCPT + 99 others); Thu, 8 Feb 2018 11:03:53 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36934 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbeBHQDh (ORCPT ); Thu, 8 Feb 2018 11:03:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 516841435; Thu, 8 Feb 2018 08:03:37 -0800 (PST) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2124A3F25C; Thu, 8 Feb 2018 08:03:37 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id DAF3B1AE4F62; Thu, 8 Feb 2018 16:03:41 +0000 (GMT) Date: Thu, 8 Feb 2018 16:03:41 +0000 From: Will Deacon To: Peter Zijlstra Cc: 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: <20180208160341.GD17775@arm.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180208154643.GB25181@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) 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: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 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