From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Borislav Petkov <petkov@math.uni-muenster.de>,
David Rientjes <rientjes@cs.washington.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched.c : correct comment for this_rq_lock() routine
Date: Wed, 1 Nov 2006 03:01:31 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0611010252460.28051@localhost.localdomain> (raw)
In-Reply-To: <4547D23A.3090007@yahoo.com.au>
On Wed, 1 Nov 2006, Nick Piggin wrote:
> Robert P. J. Day wrote:
>
> > example, i was just poking around the source for the various
> > "atomic.h" files and noticed a couple possible cleanups:
> >
> > 1) make sure *everyone* uses "volatile" in the typedef struct (which
> > i actually submitted recently)
> >
>
> I don't see why. There is nothing in atomic (eg. atomic_read) that
> says there must be a compiler barrier around the operation.
>
> Have you checked that the architecture implementation actually needs
> the volatile where you've added it?
as just one example, you can read in include/asm-alpha/atomic.h:
/*
* Counter is volatile to make sure gcc doesn't try to be clever
* and move things around on us. We need to use _exactly_ the address
* the user gave us, not some alias that contains the same information.
*/
now it may be that *some* architectures don't specifically require a
volatile counter but, AFAIK, it doesn't actually hurt if it isn't
necessary. OTOH, if it isn't necessary *at all* for *any*
architecture, then that storage class should be *removed* in its
entirety.
in any event, all this is is another example of what appears to be
niggling and unnecessary differences between arch-specific header
files that could easily be turned into a single, standard definition
that would work for everyone with very little effort (and perhaps some
day be included from a single generic header file to avoid all that
duplication in the first place).
rday
next prev parent reply other threads:[~2006-11-01 8:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 21:02 Robert P. J. Day
2006-10-30 21:08 ` David Rientjes
2006-10-30 21:34 ` Robert P. J. Day
2006-10-30 22:05 ` Björn Steinbrink
2006-10-31 15:30 ` Borislav Petkov
2006-10-31 18:11 ` Robert P. J. Day
2006-10-31 22:46 ` Nick Piggin
2006-11-01 8:01 ` Robert P. J. Day [this message]
2006-11-01 8:13 ` Nick Piggin
2006-11-01 12:27 ` Borislav Petkov
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=Pine.LNX.4.64.0611010252460.28051@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=petkov@math.uni-muenster.de \
--cc=rientjes@cs.washington.edu \
/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®