From: Keith Owens <kaos@sgi.com>
To: Christoph Hellwig <hch@sgi.com>
Cc: Piet Delaney <piet@www.piet.net>,
"Matt D. Robinson" <yakker@aparity.com>,
linux-kernel@vger.kernel.org, steiner@sgi.com,
jeremy@classic.engr.sgi.com
Subject: Re: [PATCH] 2.5.44: lkcd (9/9): dump driver and build files
Date: Tue, 22 Oct 2002 21:57:35 +1000 [thread overview]
Message-ID: <8948.1035287855@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Tue, 22 Oct 2002 14:47:45 -0400." <20021022144745.A7367@sgi.com>
On Tue, 22 Oct 2002 14:47:45 -0400,
Christoph Hellwig <hch@sgi.com> wrote:
>On Mon, Oct 21, 2002 at 03:06:59PM -0700, Piet Delaney wrote:
>> > Using volatile is almost always a bug. USe atomic variables
>> > or bitops instead.
>>
>> Yea, volatile is just being used to implement a simple atomic variable.
>
>It just isn't guaranteed to be atomic.. Use atomic_t (for actual
>values) or unsigned long + set_bit/test_bit/ænd friends for bitmasks.
atomic_t is problematic for debugging code which can be invoked by an
error from any state. On parisc, atomic_add is implemented using load
and clear on a hash of the lock address, so it is possible to get
collisions on locks when doing atomic ops from debugging code.
Especially when the parisc code in 2.5.44 has exactly one hash table
entry. kdb has the same problem and tries to avoid atomic_t for the
same reason, the current state is unreliable.
The dump_in_progress flag is set in one place and cleared in another.
All the other uses of dump_in_progress are testing its state. If
atomic_t cannot be used safely, then it must be defined as volatile.
next prev parent reply other threads:[~2002-10-22 11:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-21 10:16 Matt D. Robinson
2002-10-21 21:21 ` Christoph Hellwig
2002-10-21 19:07 ` Matt D. Robinson
2002-10-21 22:06 ` Piet Delaney
2002-10-22 18:47 ` Christoph Hellwig
2002-10-22 11:57 ` Keith Owens [this message]
2002-10-22 22:21 ` Piet Delaney
2002-10-22 22:56 ` Keith Owens
2002-10-22 16:49 ` Matt D. Robinson
2002-10-22 2:04 ` Nicholas Wourms
2002-10-22 5:45 ` Matt D. Robinson
2002-10-22 13:00 ` Christoph Hellwig
2002-10-22 15:05 ` Suparna Bhattacharya
2002-10-22 9:49 ` Jens Axboe
2002-10-22 14:43 ` Randy.Dunlap
2002-10-22 14:59 ` Jens Axboe
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=8948.1035287855@ocs3.intra.ocs.com.au \
--to=kaos@sgi.com \
--cc=hch@sgi.com \
--cc=jeremy@classic.engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=piet@www.piet.net \
--cc=steiner@sgi.com \
--cc=yakker@aparity.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
all inboxes | Powered by JetHome®