From: "Jim Hull" <jim.hull@hp.com>
To: linux-ia64@vger.kernel.org
Subject: RE: Inefficient ia64 system call implementation in glibc
Date: Fri, 19 Sep 2003 23:32:23 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106401435007961@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106398916511816@msgid-missing>
John Worley wrote:
> The real inefficiency here is the compiler output. Given the
> realities of the Itanium 2 implementation, the first two bundles
> will require 3 cycles to execute. A better coding would be:
>
> { .mmi
> alloc r36=ar.pfs,14,6,0
> mov r15\x1212
> mov r35°
> }
> { .mmi
> mov r37=r1
> mov r39=r34
> sxt4 r38=r33
> } ;;
>
> which will execute in one cycle. The sign extension, although
> "unnecessary" doesn't cost any cycles. Admittedly you could use the
> mi;;i bundle to pack the break instruction in the second bundle if
> you didn't have to sign-extend, but I'd rather see the 3 v. 1 cycle
> problem addressed first.
Hi John!
Your scheduling of this code is definitely better than the original.
One minor point: Even if you could get the tools to understand that the
sign-extension is unnecessary, you still need to copy the input argument
to the output region (from r33 to r38 in this example), so you can't
eliminate any instructions and get better bundle packing. The only
advantage the copy would have vs. the sxt is that it is an A-type
instruction, instead of I-type, which might save a cycle or so in some
other syscall stub that is sign-extending several int argument (as
opposed to the single one here).
But my real issue with the performance of this code is not with
sign-extend or the scheduling these instructions, it's with the break
instruction. I may be mistaken, but hasn't it been many months since
David Mosberger implemented all the kernel infrastructure needed to
support syscalls using the epc instruction? When will glibc be changed
to take advantage of this? I would think that only after this has
happened should we worrying about squeezing out the last cycle or two of
overhead in the syscall stubs.
-- Jim
HP PA-RISC/Itanium Processor Architect
next prev parent reply other threads:[~2003-09-19 23:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-19 16:32 Inefficient ia64 system call implementation in glibc H. J. Lu
2003-09-19 17:29 ` Grant Grundler
2003-09-19 21:46 ` John Worley
2003-09-19 23:32 ` Jim Hull [this message]
2003-09-20 13:01 ` Andreas Schwab
2003-09-21 21:04 ` Richard Henderson
2003-09-22 19:39 ` H. J. Lu
2003-09-22 21:25 ` David Mosberger
2003-09-22 23:21 ` Richard Henderson
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=marc-linux-ia64-106401435007961@msgid-missing \
--to=jim.hull@hp.com \
--cc=linux-ia64@vger.kernel.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