All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Becky Bruce <becky.bruce@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Avoid unpaired stwcx. on some processors
Date: Fri, 9 Nov 2007 18:18:00 -0600	[thread overview]
Message-ID: <20071110001759.GA21447@lixom.net> (raw)
In-Reply-To: <260A8045-7F86-46EC-9242-08BC2669890F@freescale.com>

On Fri, Nov 09, 2007 at 05:52:30PM -0600, Becky Bruce wrote:

> I don't think so. It's not plain old dangling stwcx that's the  
> problem.  It's dangling stwcx when the reservation is held to another  
> address. 

Gack, I misread the description. My bad.

> The lwarx that I've added prevents the normally dangling  
> stwcx. in the context switch/syscall  path from meeting this  
> condition.  Any process that gets swapped in and executes stwcx.  
> first thing is fine, because the reservation was previously cleared  
> by the stwcx. in the context switch path.
>
> BTW, I think you're missing a key point here, which is this:  
> Architecturally, there is a single reservation per core.  On e600 and  
> other parts, the stwcx. does *not* take the address into account for  
> success.  If you stwcx, and the reservation is held, it succeeds  
> regardless of the address.   Fun, no?   That's one of the reasons  
> it's so important that the kernel have the dummy stwcx. in place.
>
> Does that make sense?

Yep, it does, doesn't seem to be a better way to work around it.


-Olof

  reply	other threads:[~2007-11-10  0:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 22:08 [PATCH] Avoid unpaired stwcx. on some processors Becky Bruce
2007-11-09 23:19 ` Olof Johansson
2007-11-09 23:52   ` Becky Bruce
2007-11-10  0:18     ` Olof Johansson [this message]
2007-11-11  4:46   ` Benjamin Herrenschmidt
2007-11-11  7:14     ` Olof Johansson
  -- strict thread matches above, loose matches on Subject: below --
2007-11-09 22:17 Becky Bruce

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=20071110001759.GA21447@lixom.net \
    --to=olof@lixom.net \
    --cc=becky.bruce@freescale.com \
    --cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.