220 30922 <20170216004134.4902991.82070.24891@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposed alternative approach to specifying
 required memory operation ordering
Date: Wed, 15 Feb 2017 19:41:35 -0500
Lines: 105
Approved: news@gmane.org
Message-ID: <20170216004134.4902991.82070.24891@gmail.com>
References: <d0fdabcd-f04a-46e6-b93a-0b9ea85cb5bd@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1487205700 14708 195.159.176.226 (16 Feb 2017 00:41:40 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 16 Feb 2017 00:41:40 +0000 (UTC)
To: 'Walt Karas' via ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>, ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIMF2UTYUCRUBGZWGID6@isocpp.org Thu Feb 16 01:41:35 2017
Return-path: <std-proposals+bncBCUZ5QWKNQIMF2UTYUCRUBGZWGID6@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f71.google.com ([209.85.214.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIMF2UTYUCRUBGZWGID6@isocpp.org>)
	id 1ceA8c-0003L0-3s
	for gclcip-std-proposals@m.gmane.org; Thu, 16 Feb 2017 01:41:34 +0100
Original-Received: by mail-it0-f71.google.com with SMTP id w185sf10987711ita.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Feb 2017 16:41:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:content-transfer-encoding:message-id:date:subject:from
         :in-reply-to:references:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=9npYdBll79vAqYKtDmIF1jPC6QmxpZt0BSw2AFPLh/o=;
        b=YDiWwapylZbQ0jZYxrnq+3Vpp4en4MGA7axZd05gFQuGZKs11dqyCP7YstrMTD+hGq
         qQBmygQswTR+K2aasGEUEOwbaUW4Sdkrn9J9QBMFIgzAAY+5VpcQug8v8OOLMSmq75wF
         hUlKBap3FJihrTsYgIHyak+RK8EQjuSuXdSuYVvOoBC5QYubZSEodEhTFBJskiwCs4HR
         /NePwBpP6sxJKz72HkaXz+0UcvYyPmEG43eLZPULrYXqyPa3ShLmtDiXeZaFMEdyjsqo
         MwB6kEtymrdSAIfKDWaH1+oa9fx43cRaznQW/3Q1crVz4wjvQp4E7xGbBAXM7tKvF7z1
         wxwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:content-transfer-encoding
         :message-id:date:subject:from:in-reply-to:references:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=9npYdBll79vAqYKtDmIF1jPC6QmxpZt0BSw2AFPLh/o=;
        b=rpzjGWfaNcNDed7pwoGuUCNAItRhmSjJwKmZkwlnf7cdBUR6P/MOs9Kv3VsQ5fKskJ
         8p3ZT1mmKKe1vKQhdG6C1I/tM9ooofqS4nYKZJ39Zf64qknqx0Kxg5OpgkomrlN9e7xO
         n+w8mBxktT3RELK+vpgCNBN0CUCENniuPBvVuT/u4D16X402UteDrDRTDQLqzWjJgmj7
         US/C3NMZcRQvcRkzOnBUSsrxZH9rv3OWtOuU4BjgHmmrhJLY4ocvrm20NPY+Lp/FYump
         9bILtj2ktfNkPwKfiC1Xsz4G61Xpz5kvkxf8aZhf/6iyJYJAQeV8MBj/k9kkAmNSjHb7
         1LG 
X-Gm-Message-State: AMke39nD6H1b/Z8UAmAZDmJ/y9sW0KpOHfqmJXlELJCll6jRJbKn2VcMCDRr1NDSVITo4w==
X-Received: by 10.107.151.140 with SMTP id z134mr5796iod.68.1487205699408;
        Wed, 15 Feb 2017 16:41:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.87.199 with SMTP id u190ls1540785ita.8.canary-gmail; Wed,
 15 Feb 2017 16:41:38 -0800 (PST)
X-Received: by 10.36.110.205 with SMTP id w196mr11435368itc.20.1487205698269;
        Wed, 15 Feb 2017 16:41:38 -0800 (PST)
Original-Received: from mail-it0-x244.google.com (mail-it0-x244.google.com. [2607:f8b0:4001:c0b::244])
        by mx.google.com with ESMTPS id 15si5593566iou.239.2017.02.15.16.41.38
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 15 Feb 2017 16:41:38 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2607:f8b0:4001:c0b::244 as permitted sender) client-ip=2607:f8b0:4001:c0b::244;
Original-Received: by mail-it0-x244.google.com with SMTP id 203so1203061ith.2
        for <std-proposals@isocpp.org>; Wed, 15 Feb 2017 16:41:38 -0800 (PST)
X-Received: by 10.36.48.208 with SMTP id q199mr43773itq.28.1487205697200;
        Wed, 15 Feb 2017 16:41:37 -0800 (PST)
Original-Received: from [127.0.0.1] (glphon2233w-lp130-08-74-15-45-73.dsl.bell.ca. [74.15.45.73])
        by smtp.gmail.com with ESMTPSA id w77sm2509007iow.46.2017.02.15.16.41.35
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Wed, 15 Feb 2017 16:41:36 -0800 (PST)
X-Mailer: BlackBerry Email (10.3.2.2876)
In-Reply-To: <d0fdabcd-f04a-46e6-b93a-0b9ea85cb5bd@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of tvaneerd@gmail.com
 designates 2607:f8b0:4001:c0b::244 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:30922
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30922>

<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
 255, 255); line-height: initial;">                                        =
                                              <div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">Leaving the questions about =E2=80=8Eactually changing the stan=
dard aside, and focusing on understanding (which may just mean this could b=
e a std-discussion question instead of std-proposal),</div><div style=3D"wi=
dth: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-seri=
f, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-col=
or: rgb(255, 255, 255);"><br></div><div style=3D"width: 100%; font-size: in=
itial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rg=
b(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"=
>In your model, if X and Y are relaxed atomic operations in thread T1, can =
thread T2 see them as Y before X while thread T3 sees them as =E2=80=8EX be=
fore Y?</div>                                                              =
                                                                       <div=
 style=3D"width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro=
', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; ba=
ckground-color: rgb(255, 255, 255);"><br style=3D"display:initial"></div>  =
                                                                           =
                                                                           =
                                           <div style=3D"font-size: initial=
; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31,=
 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Sent=
&nbsp;from&nbsp;my&nbsp;BlackBerry&nbsp;portable&nbsp;Babbage&nbsp;Device</=
div>                                                                       =
                                                                           =
                                <table width=3D"100%" style=3D"background-c=
olor:white;border-spacing:0px;"> <tbody><tr><td colspan=3D"2" style=3D"font=
-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"=
>                           <div style=3D"border-style: solid none none; bo=
rder-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in=
 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">=
  <div><b>From: </b>'Walt Karas' via ISO C++ Standard - Future Proposals</d=
iv><div><b>Sent: </b>Wednesday, February 15, 2017 2:17 PM</div><div><b>To: =
</b>ISO C++ Standard - Future Proposals</div><div><b>Reply To: </b>std-prop=
osals@isocpp.org</div><div><b>Subject: </b>[std-proposals] Proposed alterna=
tive approach to specifying required memory operation ordering</div></div><=
/td></tr></tbody></table><div style=3D"border-style: solid none none; borde=
r-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial;=
 text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div=
 id=3D"_originalContent" style=3D""><div dir=3D"ltr"><div>- In a program ex=
ecution,&nbsp;each thread defines a nominal order of (thread local) memory =
and fence operations.</div><div>- For any operations X and Y in thread T, e=
ither X before Y, or Y before X.</div><div>- A program execution defines a =
nominal global order of global memory operations.</div><div>- If X and Y ar=
e atomic global operations, then either X before Y or Y before X in the glo=
bal order.</div><div>- If X is a global operation, and there exists a globa=
l store S where neither X before S nor S before X in the global order, then=
 the result of X is undefined.</div><div>- A program execution defines a pa=
rtial function f(T, LO) -&gt; GO where LO is a local memory operation in th=
read T, and GO is a global operation.&nbsp; If LO is atomic, then GO must b=
e atomic. The result of LO is the result of GO.&nbsp; If the result of GO i=
s undefined, the result of LO is undefined.&nbsp; (Even if f(T, LO) is not =
required to exist, it none the less _may_ exist.)</div><div>- If LO1 and LO=
2 are operations in thread T, and LO1 before LO2 in T, and f(T, LO1) and f(=
T, LO2) both exist, then f(T, LO2) before f(T, LO1) in the global order is =
not allowed.</div><div>- If:</div><div>1.&nbsp; In a thread T, X and Y are =
memory operations, and F is a fence operation.</div><div>2.&nbsp; X before&=
nbsp;F and&nbsp;F before Y.</div><div>3.&nbsp; F is sequentially consistent=
 and both X and Y are atomic, or</div><div>4.&nbsp; F is acquire and both X=
 and Y are loads, or</div><div>5.&nbsp; F is release and both X and Y are s=
tores.</div><div>then F is activated for X and Y.</div><div>-&nbsp;In a thr=
ead T, if X and Y are memory operations (where X before Y) with an activate=
d fence F, then f(T, X) must exist.</div><div>- For every global operation =
GO, there must exist a local operation LO in some thread T where f(T, LO) -=
&gt; GO.&nbsp; (Assuming no intense gamma radiation.)</div><div>- A sequent=
ially consistent (thread local) atomic memory operation implies two sequent=
ially consistent fences, one before and one after it (as well as a precedin=
g release for a store, and a succeeding acquire for a load).</div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/d0fdabcd-f04a-46e6-b93a-0b9ea85cb5bd%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/d0fdabcd-f04a-46e6-b93a-0b9ea85c=
b5bd%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20170216004134.4902991.82070.24891%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/20170216004134.4902991.82070.24891%40gm=
ail.com</a>.<br />

.
