Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@tiscali.be>
To: Arnd Bergmann <arnd@arndb.de>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] missing barrier in _raw_spin_lock?
Date: Sat, 24 Jan 2004 20:52:22 +0000	[thread overview]
Message-ID: <4012DB06.5010600@tiscali.be> (raw)
In-Reply-To: <200401231609.56800.arnd@arndb.de>



Arnd Bergmann wrote:
> We stumbled over a problem on s390 that can cause random memory corruption
> under high load on SMP. It turned out to be a missing on :"memory" clobber
> on the _raw_spin_lock primitive.
> 
> As far as I can see, the same problem is in the parisc spinlock definition
> in linux-2.6.1, but none of the other architectures.
> 
> The code below demonstrates the problem. With the broken spinlock, the
> compiler does not emit code for the second "if" or for the assignment.
> Similar code can be found in mempool_free().
> 
> 	Arnd <><
> 
> ----
> #include <linux/spinlock.h>
> 
hmm yet another stupid question of mine: what would we have to use _linux_/spinlock.h or _asm_/spinlock.h

Thanks in advance,
	Joel


> static int x;
> static spinlock_t lock;
> 
> void test(void)
> {
>         if (x) {
>                 spin_lock(&lock);
>                 if (!x)
>                         x = 0x1234;
>                 spin_unlock(&lock);
>         }
> }
> 
> _______________________________________________
> parisc-linux mailing list
> parisc-linux@lists.parisc-linux.org
> http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
> 

  reply	other threads:[~2004-01-24 20:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23 15:09 [parisc-linux] missing barrier in _raw_spin_lock? Arnd Bergmann
2004-01-24 20:52 ` Joel Soete [this message]
2004-01-24 21:07   ` Joel Soete
2004-01-24 21:15     ` John David Anglin
2004-01-25  1:37       ` Grant Grundler
2004-01-25  6:13         ` John David Anglin

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=4012DB06.5010600@tiscali.be \
    --to=soete.joel@tiscali.be \
    --cc=arnd@arndb.de \
    --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