From: Grant Grundler <grundler@dsl2.external.hp.com>
To: Matthew Wilcox <willy@debian.org>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] atomic_t
Date: Sun, 13 Jan 2002 21:09:09 -0700 [thread overview]
Message-ID: <20020114040909.87321482A@dsl2.external.hp.com> (raw)
In-Reply-To: Message from Matthew Wilcox <willy@debian.org> of "Sun, 13 Jan 2002 21:15:08 GMT." <20020113211508.V9193@parcelfarce.linux.theplanet.co.uk>
Matthew Wilcox wrote:
> Just thinking about atomic_set taking the spinlock to assure
> exclusivity... I thought we could eliminate it.
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?
...
> 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.
> The question is whether any code relies on this behaviour. It probably
> does in some of the messier bits of networking :-(
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.
thanks,
grant
next prev parent reply other threads:[~2002-01-14 4:09 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 [this message]
2002-01-14 4:43 ` Matthew Wilcox
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=20020114040909.87321482A@dsl2.external.hp.com \
--to=grundler@dsl2.external.hp.com \
--cc=parisc-linux@parisc-linux.org \
--cc=willy@debian.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