From: "Kevin D. Kissell" <kevink@mips.com>
To: Johannes Stezenbach <js@convergence.de>,
Jun Sun <jsun@mvista.com>,
linux-mips@oss.sgi.com
Subject: Re: LL/SC benchmarking [was: Mipsel libc with LL/SC online anywhere?]
Date: Fri, 26 Jul 2002 12:35:13 -0700 [thread overview]
Message-ID: <3D41A471.F3666A7@mips.com> (raw)
In-Reply-To: 3D407254.233BE0DB@mips.com
"Kevin D. Kissell" wrote:
> The prudent thing to do would be to load the MAGIC_COOKIE
> value explicitly into k1 on the way out of general exception
> service. Fortunately, it looks to me as if at least half
> of the overhead of this operation (LUI/ORI) can be concealed
> in branch/jump delay slots that are currently going unfilled.
I was distracted in the middle of that reply and got confused.
The MAGIC_COOKIE needs only to be destroyed, which can be
done in a single instruction. The 100% safe approach would
be to insert a "move k1,zero" instruction before all ERETs,
including those generated by the RESTORE_ALL_AND_RET macro
expansion, but it should faster, if very slightly larger
and somewhat more burdensome for maintenence, to plant those
instructions in branch delay slots just "upstream" from the
context restore. I'm working on the code a bit and may
be able to propose (if not test :-) a patch along these
lines, but in looking at entry.S, I note something a bit
disturbing:
There's a lot of code in there that allows the assembler
to schedule the instructions, but which also contains
SSNOPs to force timing. Isn't that a bit dangerous?
Unless it is specified that the assembler will refuse
to reschedule SSNOPs, I think those sequences need to
be bracketed with .noreorder directives. That would
also allow k1 destructors to be placed explicitly in
the delay slots, rather than assuming that they will
be put there by the assembler.
Regards,
Kevin K.
prev parent reply other threads:[~2002-07-26 19:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 13:04 Mipsel libc with LL/SC online anywhere? Kevin D. Kissell
2002-07-12 13:04 ` Kevin D. Kissell
2002-07-19 12:38 ` LL/SC benchmarking [was: Mipsel libc with LL/SC online anywhere?] Johannes Stezenbach
2002-07-19 15:54 ` Richard Hodges
2002-07-22 10:35 ` Johannes Stezenbach
2002-07-25 16:25 ` Johannes Stezenbach
2002-07-25 17:06 ` Jun Sun
2002-07-25 18:45 ` Johannes Stezenbach
2002-07-25 18:56 ` Jun Sun
2002-07-25 19:24 ` Johannes Stezenbach
2002-07-25 21:49 ` Kevin D. Kissell
2002-07-26 19:35 ` Kevin D. Kissell [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=3D41A471.F3666A7@mips.com \
--to=kevink@mips.com \
--cc=js@convergence.de \
--cc=jsun@mvista.com \
--cc=linux-mips@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox