Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3818566imm; Mon, 25 Jun 2018 05:13:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKK14qDbZYwOAbwywzcYkqnZlYZUJTnDziaG2+lrej60cDDvusWS2uik4RGzIkobT9BbVQc X-Received: by 2002:a63:a70f:: with SMTP id d15-v6mr571317pgf.168.1529928825357; Mon, 25 Jun 2018 05:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529928825; cv=none; d=google.com; s=arc-20160816; b=VD7lvO6cj2Yak0ySO5iNql3nOyGycdPoBfG9iWpMmhUThSzV3jGmIzMBykPHkPygIs OmyA92ZoStH1ep9wRCZDbmwPIVzXfiwHOVzSaVVUqp4agwhhEVQREjmGUT6EvDh43mnX 20dqpCDA/fvdrt5ogSVvtF0a9O5i30UaMAklKxxpS04hprMUQgNezYTQgP9Thb4ihw45 TeKPyWFEWTH/QeOib/LFn+Lj6URceYhbTs/doXnWZ+Ng3r8RZNozbyEmmbM8uD8k9VUt bhdrBlJ6MckytioTp031bxHZpMdEf5FNCgd+Bu4nCFAPjj1uoZ9SpHWdYseqB/25nu+N Meqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :arc-authentication-results; bh=DeTuBILydZRpkOFdKsihoVYPgrCyRrqFMSN89vIyN4A=; b=TMfdMHOFWkHgozvTUiWJMH6OBI/mXOROvc2p3E6U78mBKLd3j1u7KsDmTo216ZQm/y gSVg6D87kkzwT58PiheTKxwLD+vIJ8mi23cfUmmkeVyNPpukYyzPAKXU4qQzUZj7W4iS Vlnkdgy3DIv2FXO8ZGkeymeWGSOQkazcaynGy4l1whY/moe/qP2/zX3b9T+9zR/R4uAn kh56s9lnSfJjpgBGKAATtGDAcrTIMQY5FgYZVlf4j9BEU4v5DfnBMLdjs9Th31rbBGK6 S/AseLd3L/SunnBy/IjWpXBoHOrKhQQI3Vc6Ju75qvO0kLTqcje0K19KCPSYKyyh+pHz mKQg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5-v6si8922812plq.112.2018.06.25.05.13.30; Mon, 25 Jun 2018 05:13:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933288AbeFYMMw (ORCPT + 99 others); Mon, 25 Jun 2018 08:12:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753283AbeFYMMu (ORCPT ); Mon, 25 Jun 2018 08:12:50 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 754104001388; Mon, 25 Jun 2018 12:12:49 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-238.rdu2.redhat.com [10.10.120.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15184111DCED; Mon, 25 Jun 2018 12:12:45 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20180625095031.GX2494@hirez.programming.kicks-ass.net> References: <20180625095031.GX2494@hirez.programming.kicks-ass.net> <1529918258-7295-1-git-send-email-andrea.parri@amarulasolutions.com> To: Peter Zijlstra Cc: dhowells@redhat.com, Andrea Parri , 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2778.1529928765.1@warthog.procyon.org.uk> Date: Mon, 25 Jun 2018 13:12:45 +0100 Message-ID: <2779.1529928765@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 25 Jun 2018 12:12:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 25 Jun 2018 12:12:49 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. David