public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <kernel@borntraeger.net>
To: joe.korty@ccur.com, dhowells@redhat.com, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] volatile may be needed in rwsem
Date: Tue, 27 Jan 2004 21:20:42 +0100	[thread overview]
Message-ID: <200401272120.42675.kernel@borntraeger.net> (raw)
In-Reply-To: <20040127191155.GA12128@tsunami.ccur.com>

Joe Korty wrote:
> 'flags' should be declared volatile as rwsem_down_failed_common() spins
> waiting for this to change.  Untested.


You should use barrier() to prevent the compiler from optimizing reads away, 
not volatile. 
Here the compiler hopefully considers schedule() as a memory barrier. So 
everything should be fine.

cheers

Christian


      parent reply	other threads:[~2004-01-27 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-27 19:11 [PATCH] volatile may be needed in rwsem Joe Korty
2004-01-27 19:19 ` David Howells
2004-01-27 19:43   ` Joe Korty
2004-01-27 20:23     ` Paulo Marques
2004-01-27 20:20 ` Christian Borntraeger [this message]

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=200401272120.42675.kernel@borntraeger.net \
    --to=kernel@borntraeger.net \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.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