Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@mips.com>
To: "Ralf Baechle" <ralf@oss.sgi.com>, "H. J. Lu" <hjl@lucon.org>
Cc: <linux-mips@oss.sgi.com>,
	"GNU C Library" <libc-alpha@sources.redhat.com>
Subject: Re: PATCH: Always use ll/sc for mips
Date: Thu, 4 Jul 2002 10:47:41 +0200	[thread overview]
Message-ID: <00d401c22337$7e731580$10eca8c0@grendel> (raw)
In-Reply-To: 20020702220651.B9566@dea.linux-mips.net

> On Tue, Jul 02, 2002 at 11:40:45AM -0700, H. J. Lu wrote:
> 
> > The ll/sc emulation is implemented in 2.4.0 and above. This patch makes
> > glibc always use ll/sc.
> 
> Which means the overhead of two syscalls instead of one sysmips() call
> for something that is assumed to be dirt cheap.  R3000, R5900 etc.
> users won't this patch you, which'll have significant impact on their
> glibc performance.

The R5900 kernel for the Playstation 2 does not use system
calls.  It uses a memory-mapped pseudo-device hack that
the guys at Sony came up with, which is much faster.  We
at MIPS came up with an even faster hack which uses 
the destruction of a "k" register value, but which requires 
the branch-likely instruction and thus only workson 
MIPS II CPUs and above (R39xxx, R4xxx, R5xxx,
but not the classic R3K).  See my message
"Re: patches for test-and-set without ll/sc" of January 22.

I consider it to be very important for MIPS/Linux
that the embedded/workstation kernel and libraries
merge with the Playstation 2 "consumer" Linux, and
I don't think that will happen if we try to push the
PS2 people to use something far less efficient than
what they already have. "Entia non sunt multiplicanda 
praeter necessitatem", as a wise old guy once said,
but could we not consider a MIPS/Linux universe
where R3000 binaries use system calls, non-LL/SC
MIPSII+ binaries use k-register destruction, real,
manly, MIPS binaries use LL/SC instructions, and
where the MIPS/Linux kernel (a) supports an appropriate
system call, (b) makes a contract with userland to 
destroy k-regs predictably, and (c) contains the
emulation logic for LL/SC?  That should give us
full cross-platform binary compatibility, with optimal
performance on each platform when an appropriately
configured set of libraries and tools is installed.

            Regards,

            Kevin K.
 

WARNING: multiple messages have this Message-ID (diff)
From: "Kevin D. Kissell" <kevink@mips.com>
To: Ralf Baechle <ralf@oss.sgi.com>, "H. J. Lu" <hjl@lucon.org>
Cc: linux-mips@oss.sgi.com, GNU C Library <libc-alpha@sources.redhat.com>
Subject: Re: PATCH: Always use ll/sc for mips
Date: Thu, 4 Jul 2002 10:47:41 +0200	[thread overview]
Message-ID: <00d401c22337$7e731580$10eca8c0@grendel> (raw)
Message-ID: <20020704084741.gZx-cCbcWBmxUR6Lpx9CJP9N5wAsizkJ4RvWjpGORIE@z> (raw)
In-Reply-To: 20020702220651.B9566@dea.linux-mips.net

> On Tue, Jul 02, 2002 at 11:40:45AM -0700, H. J. Lu wrote:
> 
> > The ll/sc emulation is implemented in 2.4.0 and above. This patch makes
> > glibc always use ll/sc.
> 
> Which means the overhead of two syscalls instead of one sysmips() call
> for something that is assumed to be dirt cheap.  R3000, R5900 etc.
> users won't this patch you, which'll have significant impact on their
> glibc performance.

The R5900 kernel for the Playstation 2 does not use system
calls.  It uses a memory-mapped pseudo-device hack that
the guys at Sony came up with, which is much faster.  We
at MIPS came up with an even faster hack which uses 
the destruction of a "k" register value, but which requires 
the branch-likely instruction and thus only workson 
MIPS II CPUs and above (R39xxx, R4xxx, R5xxx,
but not the classic R3K).  See my message
"Re: patches for test-and-set without ll/sc" of January 22.

I consider it to be very important for MIPS/Linux
that the embedded/workstation kernel and libraries
merge with the Playstation 2 "consumer" Linux, and
I don't think that will happen if we try to push the
PS2 people to use something far less efficient than
what they already have. "Entia non sunt multiplicanda 
praeter necessitatem", as a wise old guy once said,
but could we not consider a MIPS/Linux universe
where R3000 binaries use system calls, non-LL/SC
MIPSII+ binaries use k-register destruction, real,
manly, MIPS binaries use LL/SC instructions, and
where the MIPS/Linux kernel (a) supports an appropriate
system call, (b) makes a contract with userland to 
destroy k-regs predictably, and (c) contains the
emulation logic for LL/SC?  That should give us
full cross-platform binary compatibility, with optimal
performance on each platform when an appropriately
configured set of libraries and tools is installed.

            Regards,

            Kevin K.
 

  parent reply	other threads:[~2002-07-04  8:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-02 18:40 PATCH: Always use ll/sc for mips H. J. Lu
2002-07-02 20:06 ` Ralf Baechle
2002-07-02 21:04   ` H. J. Lu
2002-07-04  8:00     ` Maciej W. Rozycki
2002-07-04  8:47   ` Kevin D. Kissell [this message]
2002-07-04  8:47     ` Kevin D. Kissell
2002-07-04 13:57     ` Ralf Baechle
2002-07-04 14:14       ` Hiroyuki Machida
2002-07-08 17:21       ` Jun Sun
2002-07-08 17:34         ` Ralf Baechle
2002-07-16  0:59 ` Ulrich Drepper
2002-07-16 15:22   ` Maciej W. Rozycki
2002-07-16 15:42     ` H. J. Lu
2002-07-17  8:31       ` Maciej W. Rozycki
2002-07-17 15:01         ` H. J. Lu

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='00d401c22337$7e731580$10eca8c0@grendel' \
    --to=kevink@mips.com \
    --cc=hjl@lucon.org \
    --cc=libc-alpha@sources.redhat.com \
    --cc=linux-mips@oss.sgi.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox