Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4000571imm; Tue, 11 Sep 2018 05:33:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda/Jun4rMazSoop1h90FLppovlgxJ7m7ex2k3ERgT9FE1VEfrX8DrT9sMgrR0X7HMgb6eFB X-Received: by 2002:a62:9541:: with SMTP id p62-v6mr29719104pfd.194.1536669219927; Tue, 11 Sep 2018 05:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536669219; cv=none; d=google.com; s=arc-20160816; b=h4PXCAZoH9fc99q6HUyzt5A78EBssaRHQDqYQj/AMnNY0ZLJ381Xc+WcR+sq33lFFL By7qW7QYusoj/x0Zan+qZbR3k4ZtXYJrMrFoecdep+WUr71G19MsGOMNo80dvPd0lNZA nnM+I50Zr6+SQlb+eMs9+ZfTqxFYPGrVSgv1yRnp4NdXOWtCVx38+6qIMesQptioAGLC GDXjkg0xJ7mvd9yR5YdzznosyAyP773Dlwb24MxOxXpJ6aLaOIvgUDb5bGrH1m/9UiGl r2VhV+warTgKYtEUut9KHVSIff7H80IWQ8IJeb/5/Ik+Oo/ngAlzePtUO4QdS8HbZ9zB spbQ== 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; bh=LdIkSJaXW3M3ti7qI9o3wJC3OHnfyApnJJA9YWpRMf8=; b=wihE04XmmZMtqPOM3VEROQ8Z6u+SM6VlbDgbsbyeYFkomgwCp//hoXgMU33CfgsOB+ FY4SRMmsEmY4x4BGv94iVA6+ccfJeVcpEOCBazYoL//h0ZAbDWLpXBuo8Dvzptxo7yNH fSI78NRddFdINWyU271RljGu4hN1Uhzsr4fhmisfSg24L7elyS0Dq/4gebt6oI6lr5Cc 6L/IDUc52mgERifqYzFn/rZWN25L0rftYe4Xl6mv1f/Y87uZEqy6ak8oBKZp1rub2GN8 0ZordZSkEfFsskQMHWi81XurvdRAN5AmrYtdWzELoeogMH40ZlD2NVoGnd1p7rCK04gd 8Pxw== 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 e11-v6si20060573pga.150.2018.09.11.05.33.22; Tue, 11 Sep 2018 05:33:39 -0700 (PDT) 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 S1727685AbeIKRcH (ORCPT + 99 others); Tue, 11 Sep 2018 13:32:07 -0400 Received: from foss.arm.com ([217.140.101.70]:43032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbeIKRcG (ORCPT ); Tue, 11 Sep 2018 13:32:06 -0400 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 48BC018A; Tue, 11 Sep 2018 05:32:59 -0700 (PDT) Received: from queper01-lin (queper01-lin.emea.arm.com [10.4.13.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 301003F71F; Tue, 11 Sep 2018 05:32:55 -0700 (PDT) Date: Tue, 11 Sep 2018 13:32:50 +0100 From: Quentin Perret To: Andrea Parri Cc: Patrick Bellasi , peterz@infradead.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, mingo@redhat.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, chris.redpath@arm.com, valentin.schneider@arm.com, vincent.guittot@linaro.org, thara.gopinath@linaro.org, viresh.kumar@linaro.org, tkjos@google.com, joel@joelfernandes.org, smuckle@google.com, adharmap@codeaurora.org, skannan@codeaurora.org, pkondeti@codeaurora.org, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org Subject: Re: [PATCH v6 03/14] PM: Introduce an Energy Model management framework Message-ID: <20180911123248.mjcaxrycfdelypo2@queper01-lin> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180820094420.26590-4-quentin.perret@arm.com> <20180829100435.GP2960@e110439-lin> <20180829132811.iacfltcos6kfgp7e@queper01-lin> <20180911093456.GA27352@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180911093456.GA27352@andrea> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrea, On Tuesday 11 Sep 2018 at 11:34:56 (+0200), Andrea Parri wrote: > FYI, the directory "tools/memory-model/" provides an "automated > memory-barriers.txt": in short, you encode your "memory ordering > questions" into "litmus tests" to be passed to the tool/simulator; > the tool will then answer with "Yes/No" (plus other information). > > Some preparation is required to set up and learn how to use the > LKMM tools, but once there, I expect them to be more "efficient" > than reading memory-barriers.txt... ;-) Thanks for pointing this out, I'll have a look. > Please don't hesitate > to contact me/the LKMM maintainers if you need help with this. And thanks for that too. > You'd need some info in order to write down a _well-formed litmus > test, e.g., matching barrier/synchronization and interested memory > accesses on the reader side (IAC, the replacement "store-release > -> store-once+smp_wmb" discussed above is suspicious...). Regarding the disccusion above, I was actually planning on removing the smp_wmb entirely and rely on WRITE_ONCE + mutex_{un}lock here. Do you see something obviously wrong with that ? I guess the LKMM tools should give me the yes/no answer I want, but if that's a no, I'd also like to understand why ... :-) Thanks, Quentin