linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Chris Snook <csnook@redhat.com>
Cc: paulmck@linux.vnet.ibm.com, heiko.carstens@de.ibm.com,
	horms@verge.net.au, linux-kernel@vger.kernel.org,
	rpjday@mindspring.com, ak@suse.de, netdev@vger.kernel.org,
	cfriesen@nortel.com, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, jesper.juhl@gmail.com,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-arch@vger.kernel.org, zlynx@acm.org,
	schwidefsky@de.ibm.com, davem@davemloft.net,
	wensong@linux-vs.org, wjiang@resilience.com
Subject: Re: [PATCH 1/24] make atomic_read() behave consistently on alpha
Date: Fri, 10 Aug 2007 01:02:13 +0200	[thread overview]
Message-ID: <f571b4f940ec48e7984c7cdad6ac64f5@kernel.crashing.org> (raw)
In-Reply-To: <46BB6F65.8040204@redhat.com>

>>>> So, why not use the well-defined alternative?
>>> Because we don't need to, and it hurts performance.
>> It hurts performance by implementing 32-bit atomic reads in assembler?
>
> No, I misunderstood the question.  Implementing 32-bit atomic reads in 
> assembler is redundant, because any sane compiler, *particularly* and 
> optimizing compiler (and we're only in this mess because of optimizing 
> compilers)

Oh please, don't tell me you don't want an optimising compiler.
And if you _do_ want one, well you're in this mess because you
chose C as implementation language and C has some pretty strange
rules.  Trying to use not-all-that-well-defined-and-completely-
misunderstood features of the language doesn't make things easier;
trying to use something that isn't even part of the language and
that your particular compiler originally supported by accident,
and that isn't yet an officially supported feature, and that on
top of it all has a track record of problems -- well it makes me
wonder if you're in this game for fun or what.

>  will give us that automatically without the assembler.

No, it does *not* give it to you automatically; you have to do
either the asm() thing, or the not-defined-at-all *(volatile *)&
thing.

> Yes, it is legal for a compiler to violate this assumption.  It is 
> also legal for us to refuse to maintain compatibility with compilers 
> that suck this badly.

So that's rm include/linux/compiler-gcc*.h then.  Good luck with
the intel compiler, maybe it works more to your liking.


Segher


  reply	other threads:[~2007-08-09 23:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09 13:24 [PATCH 1/24] make atomic_read() behave consistently on alpha Chris Snook
2007-08-09 14:32 ` Paul E. McKenney
2007-08-09 14:53   ` Chris Snook
2007-08-09 15:04     ` Paul E. McKenney
2007-08-09 15:24       ` Chris Snook
2007-08-09 15:50         ` Segher Boessenkool
2007-08-09 16:20           ` Chris Snook
2007-08-09 18:38             ` Segher Boessenkool
2007-08-09 19:05               ` Chris Snook
2007-08-09 19:19                 ` Segher Boessenkool
2007-08-09 19:25                 ` Geert Uytterhoeven
2007-08-09 19:47                   ` Chris Snook
2007-08-09 23:02                     ` Segher Boessenkool [this message]
2007-08-09 16:10         ` Paul E. McKenney
2007-08-09 16:36           ` Chris Snook
2007-08-09 16:58             ` Paul E. McKenney
2007-08-09 17:14               ` Chris Snook
2007-08-09 17:41                 ` Paul E. McKenney
2007-08-09 18:13                   ` Chris Snook
2007-08-09 18:45                     ` Paul E. McKenney
2007-08-09 19:24                       ` Chris Snook
2007-08-10  1:28                         ` Paul E. McKenney
2007-08-10 19:49                           ` Chris Snook
2007-08-10 20:26                             ` Paul E. McKenney
2007-08-09 19:17                 ` Segher Boessenkool
2007-08-09 18:51             ` Segher Boessenkool
2007-08-09 19:30               ` Chris Snook
2007-08-10  8:21           ` Herbert Xu
2007-08-10  9:08             ` Andi Kleen
2007-08-10 15:02               ` Paul E. McKenney
2007-08-10 20:07             ` Segher Boessenkool
2007-08-11  0:00               ` Herbert Xu
2007-08-11  0:38                 ` Segher Boessenkool
2007-08-11  0:43                   ` Herbert Xu
2007-08-11  0:50                     ` Segher Boessenkool
2007-08-11  4:38                   ` Valdis.Kletnieks

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=f571b4f940ec48e7984c7cdad6ac64f5@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=cfriesen@nortel.com \
    --cc=csnook@redhat.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=horms@verge.net.au \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rpjday@mindspring.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wensong@linux-vs.org \
    --cc=wjiang@resilience.com \
    --cc=zlynx@acm.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;
as well as URLs for NNTP newsgroup(s).