From: Jun Sun <jsun@mvista.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@uni-koblenz.de>, linux-mips@oss.sgi.com
Subject: Re: MIPS_ATOMIC_SET in sys_sysmips()
Date: Tue, 19 Dec 2000 10:38:35 -0800 [thread overview]
Message-ID: <3A3FAB2B.35F0148E@mvista.com> (raw)
In-Reply-To: Pine.GSO.3.96.1001219140739.10024F-100000@delta.ds2.pg.gda.pl
"Maciej W. Rozycki" wrote:
>
> On Mon, 18 Dec 2000, Jun Sun wrote:
>
> > It looks like sometime after test5 the MIPS_ATOMIC_SET case in sys_sysmips()
> > function in the CVS tree is changed. The new code now uses ll/sc instructions
> > and handles syscall trace, etc..
> >
> > This change does not make sense to me. The userland typically uses
> > MIPS_ATOMIC_SET when ll/sc instructions are not available. But the new code
> > itself uses ll/sc, which pretty much forfeit the purpose. Or do I miss
> > something else?
>
> There is no problem with using ll/sc in sysmips() itself for machines
> that support them.
>
Sure - but with ll/sc available the user programs don't need to issue
sysmip(MIPS_ATOMIC_SET,...) at the first place ...
> > What do we offer to machines without ll/sc?
>
> I asked Ralf for a clarification of the sysmips(MIPS_ATOMIC_SET, ...)
> call before I write better code. No response so far. I'm now really
> cosidering implementing the Ultrix atomic_op() syscall -- at least it has
> a well-known defined behaviour.
>
Where can I find the definitino of atomic_op()? Or can you tell us a little
more about it?
> > BTW, what is the wrong with previous code? I understand it may be broken in
> > SMP case, but I think that is fixable. Comments?
>
> The previous code was definitely broken -- depending on the path taken it
> would return either the value fetched from memory or an error code. No
> way to distinguish between them.
>
I notice that. I notice glibc is the only "customer" of the MIPS_SET_ATOMIC
call, the bug does not appear to be a big deal because error should not
happen. Of course, it will be nice to fix it.
Jun
next prev parent reply other threads:[~2000-12-19 18:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-19 2:03 MIPS_ATOMIC_SET in sys_sysmips() Jun Sun
2000-12-19 13:25 ` Maciej W. Rozycki
2000-12-19 17:03 ` Harald Koerfgen
2000-12-19 18:03 ` Maciej W. Rozycki
2000-12-19 18:38 ` Jun Sun [this message]
2000-12-20 13:24 ` Maciej W. Rozycki
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=3A3FAB2B.35F0148E@mvista.com \
--to=jsun@mvista.com \
--cc=linux-mips@oss.sgi.com \
--cc=macro@ds2.pg.gda.pl \
--cc=ralf@uni-koblenz.de \
/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