qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores
Date: Fri, 7 Nov 2008 15:19:08 +0100	[thread overview]
Message-ID: <761ea48b0811070619y3a6447e9g7b07dee73703ef6c@mail.gmail.com> (raw)
In-Reply-To: <20081107140034.GA28030@volta.aurel32.net>

On Fri, Nov 7, 2008 at 3:00 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Fri, Nov 07, 2008 at 12:34:29PM +0100, Laurent Desnogues wrote:
>> Hello,
>>
>> this patch is based on Vince Weaver patch for locked loads/stores.
>> It was checked against Alpha architecture manual.
>>
>> Two fixes were done to Vince's patch:
>>
>>    - use a comparison to 1 for lock instead of 0 to be closer to the
>>      Alpha spec
>
> I don't agree with this part. The current code use a single variable for
> both address and lock_bit to spare a few tests. Basically it sets
> cpu_lock to -1 when not locked and stores the address when locked. Your
> patch does not compare the address, so it will break multi-threading.

My understanding of the Alpha architecture manual is that
if the addresses don't meet certain criteria (which you
simplify to addresses comparison) then failure or success
of st_c is UNPREDICTABLE (I am not shouting, it's the way
they write it :-) unless some lock clearing occurred (cf
section 4.2.5).

I am not arguing, I just wonder...


Laurent

  reply	other threads:[~2008-11-07 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 11:34 [Qemu-devel] [PATCH] Alpha: fix locked loads/stores Laurent Desnogues
2008-11-07 14:00 ` Aurelien Jarno
2008-11-07 14:19   ` Laurent Desnogues [this message]
2008-11-07 15:18     ` Aurelien Jarno
2008-11-07 16:42       ` Laurent Desnogues
2008-11-07 17:44         ` Vince Weaver
2008-11-08  9:12           ` Aurelien Jarno
2008-11-08 14:11             ` Laurent Desnogues
2008-11-07 16:47       ` Paul Brook

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=761ea48b0811070619y3a6447e9g7b07dee73703ef6c@mail.gmail.com \
    --to=laurent.desnogues@gmail.com \
    --cc=qemu-devel@nongnu.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).