Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3834522imm; Mon, 25 Jun 2018 05:29:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI41HLero623Vn87WI3dmE6c6XKFjZOS/Kmx637VShHjRDee32VOV5BH5pgnYAIZoXUyNkE X-Received: by 2002:a62:1fd6:: with SMTP id l83-v6mr13021235pfj.182.1529929799449; Mon, 25 Jun 2018 05:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529929799; cv=none; d=google.com; s=arc-20160816; b=y1aD3+L8X1F0Vi9r2BW/WMcPQjj0n/XxmzDjZStHIADDLdy3L88N/gMwv7Aui/3EC9 Jxqv2oYpYfPlAc/edj7ut+Wk98gvYSWMcqdRiYcv4l1qlYwXZG0Kpl1bk2lSxah2FgFN 8NZwqVZj/usaYvIOBuQi7/xHDknIJa1/n8WkiqQFZdbN8fZraLxkcRzByBYjF8JoZiTr t8GKxBJQw1aXNORvxN9NoloCx2bvcEJtFyEbGYtuZQXAt4sircxdU6ePePG0sykXDqJE DJGo8Aj1JGASMYWFV+ehJg5lmvFp2kpO9U5XEBwtEZKwuD7vWGs9+XIGRmExiPXZubyW Ysmg== 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=dQNcDwnOwnVEUXUmhf9ZvVWo7Vy7a/wJ3xoDGr4k8Ko=; b=qaHYAp8ckyqBQdX5NONa72FfwGFn/BkpYLKOPsJ2SJ1DM2YQ82akIGZ70wcxhEVVDQ tNF5RBv7ZN8/+wGoMyini3J3DnU0lTO/DOixgx0ptpkx3Wwc/bJ0F2wezVVF20AwtUU5 myzJ9LSu2VM+YwRitt36PpRvtp9Jk8B/DfrTFo5SS2A6XeHVCOb50HlLqMnpjxhJykGc buD/85q5jZCJwYN7tCVLw32Dnp9TE1uKglxGMHamnVw7aHctW+pLrUMaBsOCPeDOlGKw /7i8eKN2PZqeuaTFCG0dKhskKGcp+4tnD4Tmhag/cmwyvAUCI4MeIZk8knbEFqqVIRdY pp8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EJSjviAf; 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 t5-v6si11291388pgu.305.2018.06.25.05.29.45; Mon, 25 Jun 2018 05:29:59 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EJSjviAf; 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 S933291AbeFYM27 (ORCPT + 99 others); Mon, 25 Jun 2018 08:28:59 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:55832 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755340AbeFYM25 (ORCPT ); Mon, 25 Jun 2018 08:28:57 -0400 Received: by mail-wm0-f65.google.com with SMTP id v16-v6so9064356wmh.5 for ; Mon, 25 Jun 2018 05:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dQNcDwnOwnVEUXUmhf9ZvVWo7Vy7a/wJ3xoDGr4k8Ko=; b=EJSjviAfDN2q0grzWsKolvdEiEUwFJxvn5E+WgWubX2I99aUCkz+IKXvhiTdvqnSwS GLw+V9OpdU/RTcgcpK4M822Ky7R6cr66Jn6yhspE3fvPtW1pmVv9m1A71CJqaRiG7Oi8 0BfPj+v4yXX10k7fdavybUbF9HiZNVbJzkqEY= 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=dQNcDwnOwnVEUXUmhf9ZvVWo7Vy7a/wJ3xoDGr4k8Ko=; b=B5JafsD27/N24mQ7s02ecqQtB3nuvUjLkTYsRf97qZTBqH/qrnPQDMks7SsxYepW0F bHaV0axZRZq687yaAp6Fhv9If00HZkAZXW3RB1GMCmPWN92kok7Ooq9jvE/7lX6QW7tU llmdpyu+0JazSwXTZJ14bMGUoB5UTaek1tHNZMcvr1989ufyNzAzMmos8BJtUzY3vPzD L2hdZzz36VSiM10cG5W4wK9sZj4IfOhnMgMyvQf8o5gVy7y92vN+rDOVU2KkMTdfP4PB 5zyYBvbMRFk8gZieVr3dnBYXILs5tbxgUIkFO8f3/BbVU+U8xNHS6MvHpjQKw9Fu+hLg FE0w== X-Gm-Message-State: APt69E3JVdWrSyhKJN8O/wX5SZeyZx7stmUr1EUP+GI+6If+1XQpko80 brlPr8+YfMjqhnQWrkZkOo8I91o+ X-Received: by 2002:a1c:d004:: with SMTP id h4-v6mr842177wmg.151.1529929736757; Mon, 25 Jun 2018 05:28:56 -0700 (PDT) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id z14-v6sm14238801wrm.49.2018.06.25.05.28.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 05:28:56 -0700 (PDT) Date: Mon, 25 Jun 2018 14:28:50 +0200 From: Andrea Parri To: David Howells Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Jonathan Corbet , Ingo Molnar , Randy Dunlap Subject: Re: [PATCH] doc: Update wake_up() & co. memory-barrier guarantees Message-ID: <20180625122850.GA14561@andrea> References: <20180625095031.GX2494@hirez.programming.kicks-ass.net> <1529918258-7295-1-git-send-email-andrea.parri@amarulasolutions.com> <2779.1529928765@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2779.1529928765@warthog.procyon.org.uk> 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 Mon, Jun 25, 2018 at 01:12:45PM +0100, David Howells wrote: > Peter Zijlstra wrote: > > > So yes, I suppose we're entirely suck with the full memory barrier > > semantics like that. But I still find it easier to think of it like a > > RELEASE that pairs with the ACQUIRE of waking up, such that the task > > is guaranteed to observe it's own wake condition. > > > > And maybe that is the thing I'm missing here. These comments only state > > that it does in fact imply a full memory barrier, but do not explain > > why, should it? > > I think because RELEASE and ACQUIRE concepts didn't really exist in Linux at > the time I wrote the doc, so the choices were read/readdep, write or full. > > Since this document defines the *minimum* you can expect rather than what the > kernel actually gives you, I think it probably makes sense to switch to > RELEASE and ACQUIRE here. RELEASE and ACQUIRE are not enough in SB. Can you elaborate? Andrea > > David