Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: Grant Grundler <grundler@dsl2.external.hp.com>
Cc: Matthew Wilcox <willy@debian.org>, parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] atomic_t
Date: Mon, 14 Jan 2002 04:43:37 +0000	[thread overview]
Message-ID: <20020114044337.B9193@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20020114040909.87321482A@dsl2.external.hp.com>; from grundler@dsl2.external.hp.com on Sun, Jan 13, 2002 at 09:09:09PM -0700

On Sun, Jan 13, 2002 at 09:09:09PM -0700, Grant Grundler wrote:
> You are only looking at interactions between atomic_set
> and atomic_add_return. Aren't there potentialially other
> types of interactions with other atomic operations?
> But I don't know. Alan Cox?

Not on PA... look at <asm/atomic.h>.  There's only 3 primitives, all
other atomic ops are defined in terms of those.

> > Before step b leads to case 2.  after step d leads to case 1.  between
> > steps b and d, it's as if the atomic_set _never_happened_.  It results
> > in v=4, a_a_r returns 4.
> 
> I agree with the analysis.
> 
> But someone thought it was time to reset the counter. And if
> it "never happened", then whoever is looking for 'v == 1' will
> never see it.

It's a race though; they can't guarantee to see it anyway.

> Even if that code doesn't exist today, it might exist in the future.
> I don't want to bet on corner cases with the semantics.
> Those types of bugs are hard to reproduce and hard to debug.

yeah, wasn't planning on committing.

-- 
Revolutions do not require corporate support.

  reply	other threads:[~2002-01-14  4:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-13 21:15 [parisc-linux] atomic_t Matthew Wilcox
2002-01-14  4:09 ` Grant Grundler
2002-01-14  4:43   ` Matthew Wilcox [this message]
2002-01-14  7:12     ` Grant Grundler
2002-01-14  9:54   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-01-14  6:54 John Marvin

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=20020114044337.B9193@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=grundler@dsl2.external.hp.com \
    --cc=parisc-linux@parisc-linux.org \
    /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