public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Torvald Riegel <triegel@redhat.com>
Cc: munroesj@linux.vnet.ibm.com,
	Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>,
	libc-alpha@sourceware.org,
	aaron Sawdey <acsawdey@linux.vnet.ibm.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	Steve Munroe <sjmunroe@us.ibm.co>,
	carlos@redhat.com, adhemerval.zanella@linaro.org,
	adconrad@ubuntu.com, wschmidt@linux.vnet.ibm.com
Subject: Re: BZ 20822 :powerpc: race condition in __lll_unlock_elision
Date: Tue, 22 Nov 2016 10:52:00 -0000	[thread overview]
Message-ID: <e649d9d8-1711-fa6b-b075-7dfdaf0c18d4@redhat.com> (raw)
In-Reply-To: <1479807670.7146.1295.camel@localhost.localdomain>

On 11/22/2016 10:41 AM, Torvald Riegel wrote:

>> And unlike code
>> using incorrect synchronization or legacy atomics, we don't have a path
>> towards the C11 model because what the code does is completely outside
>> it, so there's no argument on favor of gradual/partial conversion.
>
> The HW transaction has to synchronize with nontransactional code.  We're
> obviously going to use the C11 model for nontransactional code.  Thus,
> it cannot be unrelated.  It's true that we don't have a detailed
> description of how HW transactions *extend* the C11 model, but it
> clearly would be an extension because it simply has to fit in there and
> it will use the same underlying mechanisms.
>
> One can also think about it this way: There is nontransactional code
> that has to use atomics (because there are concurrent accesses from
> other nontransactional code as well as transactional code).  So we are
> going to use atomics there.  Then, even if just for consistency, we're
> going to use (relaxed MO) atomic accesses too for all other concurrent
> accesses to the same data.

The counter-argument to that this is until we have a specification of 
how this kind of transactional memory works, we don't know what it means 
if an object is accessed from both a transaction and and other 
non-transactional code, and what external constraints are needed to make 
such access valid (if any).  There are some really scary examples from 
early transaction memory implementations.

But come to think of it, the core issue hasn't got to do much with 
atomics at all.  It's just about how the transactional memory 
implementation works.  So I don't really have any strong opinions here.

Thanks,
Florian

  reply	other threads:[~2016-11-22 10:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 16:13 Rajalakshmi Srinivasaraghavan
2016-11-16 13:40 ` Adhemerval Zanella
2016-11-16 14:08   ` Szabolcs Nagy
2016-11-16 14:31     ` Adhemerval Zanella
2016-11-16 15:54       ` Rajalakshmi Srinivasaraghavan
2016-11-17 14:47 ` Torvald Riegel
2016-11-21 23:42   ` Steven Munroe
2016-11-22  8:44     ` Torvald Riegel
2016-11-22  8:55       ` Florian Weimer
2016-11-22  9:41         ` Torvald Riegel
2016-11-22 10:52           ` Florian Weimer [this message]
2016-11-22 13:45             ` Torvald Riegel
2016-11-22 15:02               ` Florian Weimer
2016-11-22 16:58                 ` Torvald Riegel
2016-11-22 18:40                   ` Informal model for transactional memory (was: Re: BZ 20822 :powerpc: race condition in __lll_unlock_elision) Florian Weimer
2016-11-22 20:15                     ` Steven Munroe
2016-11-23 14:29                     ` Torvald Riegel
2016-11-22 18:03       ` BZ 20822 :powerpc: race condition in __lll_unlock_elision Steven Munroe
2016-11-23 11:30         ` Torvald Riegel
2016-11-23 17:02           ` Steven Munroe
2016-11-23 18:35             ` Torvald Riegel
2016-12-04 12:14   ` Torvald Riegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e649d9d8-1711-fa6b-b075-7dfdaf0c18d4@redhat.com \
    --to=fweimer@redhat.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=acsawdey@linux.vnet.ibm.com \
    --cc=adconrad@ubuntu.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=munroesj@linux.vnet.ibm.com \
    --cc=raji@linux.vnet.ibm.com \
    --cc=sjmunroe@us.ibm.co \
    --cc=triegel@redhat.com \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).