From: Jun Sun <jsun@mvista.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>,
linux-mips@oss.sgi.com, Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: Build failure for R3000 DECstation
Date: Wed, 15 Nov 2000 12:21:54 -0800 [thread overview]
Message-ID: <3A12F062.5E05CA0B@mvista.com> (raw)
In-Reply-To: Pine.GSO.3.96.1001115210032.5687K-100000@delta.ds2.pg.gda.pl
"Maciej W. Rozycki" wrote:
>
> On Wed, 15 Nov 2000, Harald Koerfgen wrote:
>
> > On 15-Nov-00 Jun Sun wrote:
> > [R3000 UP userland spinlocks]
> > > In fact, I don't think you can perform automic operation ONLY based on
> > > the knowledge whether a context switch has happened during a specified
> > > period. (It should be interesting to see if we can actually "prove"
> > > it.)
> >
> > I doubt this as well, although I'd love to be proven wrong.
>
> Well, on UP the only events that can break atomicity are exceptions (here
> I treat interrupts as exceptions as well) and DMA accesses. I don't think
> we do DMA to user space, so this should not be a problem. So if we can
> detect an exception occured we may assume an operation failed and retry.
> It's not a problem for an exception handler to clobber k0 or k1 upon exit.
>
I gave more thoughts on this. While your argument sounds plausible, the
devil is in "retry" - without a lower-level atomic operation, you cannot
"restore" the initial condition and conduct a re-try.
Come up with a pseudo code to show I am wrong.
> Unfortunately we cannot use this implementation in the userland or we
> risk problems when running on SMP systems -- an ISA-I user binary might
> very well be run on an ISA-II (or higher) SMP system. But we can use it
> in the kernel, for sysmips() and everything else. All we have to be
> careful about is not to allow DMA accesses to spinlocks. I don't think
> this is a problem in reality.
>
Let us solve UP first. :-)
Jun
next prev parent reply other threads:[~2000-11-15 20:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-12 20:00 Build failure for R3000 DECstation Jan-Benedict Glaw
2000-11-13 9:47 ` Ralf Baechle
2000-11-14 21:30 ` Harald Koerfgen
2000-11-14 23:41 ` Ralf Baechle
2000-11-15 0:58 ` Maciej W. Rozycki
2000-11-15 1:43 ` Ralf Baechle
2000-11-15 3:13 ` Jun Sun
2000-11-15 3:16 ` Ralf Baechle
2000-11-15 11:21 ` Maciej W. Rozycki
2000-11-15 19:46 ` Harald Koerfgen
2000-11-15 20:17 ` Maciej W. Rozycki
2000-11-15 20:21 ` Jun Sun [this message]
2000-11-16 13:23 ` Maciej W. Rozycki
2000-11-15 20:17 ` Jun Sun
2000-11-15 20:31 ` Maciej W. Rozycki
2000-11-15 11:18 ` Maciej W. Rozycki
2000-11-16 1:27 ` Ralf Baechle
2000-11-16 13:41 ` Maciej W. Rozycki
2000-11-15 19:46 ` Harald Koerfgen
2000-11-13 21:03 ` Harald Koerfgen
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=3A12F062.5E05CA0B@mvista.com \
--to=jsun@mvista.com \
--cc=Harald.Koerfgen@home.ivm.de \
--cc=linux-mips@oss.sgi.com \
--cc=macro@ds2.pg.gda.pl \
--cc=ralf@oss.sgi.com \
/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.