Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@convergence.de>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: "Kevin D. Kissell" <kevink@mips.com>, linux-mips@linux-mips.org
Subject: Re: Once again: test_and_set for CPUs w/o LL/SC
Date: Tue, 15 Oct 2002 19:21:08 +0200	[thread overview]
Message-ID: <20021015172108.GD21220@convergence.de> (raw)
In-Reply-To: <Pine.GSO.3.96.1021015171817.16503B-100000@delta.ds2.pg.gda.pl>

On Tue, Oct 15, 2002 at 05:36:29PM +0200, Maciej W. Rozycki wrote:
> On Mon, 7 Oct 2002, Johannes Stezenbach wrote:
> 
> > The question is how the glibc can detect if
> > a) the CPU does not have LL/SC
> > b) the kernel guarantees k1 != MAGIC
> 
>  Well, since the relevant code will mostly be inlined, you don't really
> need either as you can't select an alternative anyway.  The relevant
> variant will be selected at the build time as it's already being done for
> the ll/sc and sysmips() variants.  You may consider marking binaries as
> using your approach so that the kernel refuses to run them if unsupported,
> but for MIPS it isn't performed for any functionality so far, so you'd
> have to study how other ports do that and which way is most suitable. 

Well, in the (experimental) glibc-patch I posted here on
Fri, 19 Jul 2002 14:38:29 +0200 (Subject: LL/SC benchmarking),
I had some code that lets one chose the implementation
(sysmips vs. LL/SC vs. beql_k1) at run-time, based on the
existence of some "signaling" files. This was used for benchmarking.

The ability to choose the implementation at run time sacrifices
inlining, but has obvious performance benefits for the VR41XX-like
platforms. It's also not a special MIPS thing,
e.g. linuxthreads/sysdeps/<platform>/pt-machine.h has the
HAS_COMPARE_AND_SWAP / TEST_FOR_COMPARE_AND_SWAP hooks,
used by e.g. i386.

But all that is of interest only, if VR41XX-like platforms
would use a glibc from a binary distribution like RedHat or
Debian (I use Debian for development, but have a custom
compiled glibc for production use).
But it seems that this isn't the case?

> > I also want to know if there's public interest to get such
> > a change in the kernel. If yes, I will try to get a matching
> > patch into glibc. If no, I will just post the current patch I
> > use to the list for the hackers to pick up.
> 
>  Well, the kernel changes should be trivial, with no performance impact if
> written carefully, so they might get included even if only a few people
> are interested.  Send a proposal.

Yes, the kernel changes are not difficult. The difficulty was
to find out the minimal necessary changes.


Regards,
Johannes

  reply	other threads:[~2002-10-15 17:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16 16:40 Once again: test_and_set for CPUs w/o LL/SC Johannes Stezenbach
2002-10-07 14:47 ` Johannes Stezenbach
2002-10-07 16:21   ` Kevin D. Kissell
2002-10-07 16:21     ` Kevin D. Kissell
2002-10-07 18:43     ` Johannes Stezenbach
2002-10-07 18:51       ` Daniel Jacobowitz
2002-10-15 17:52         ` Johannes Stezenbach
2002-10-08  7:38       ` Kevin D. Kissell
2002-10-08  7:38         ` Kevin D. Kissell
2002-10-15 15:36       ` Maciej W. Rozycki
2002-10-15 17:21         ` Johannes Stezenbach [this message]
2002-10-16 12:20           ` Maciej W. Rozycki
2002-10-16 12:52             ` Johannes Stezenbach
2002-10-16 16:30               ` Johannes Stezenbach
2002-10-17  9:47                 ` Gleb O. Raiko
2002-10-17 12:02                   ` Maciej W. Rozycki
2002-10-17 13:11                     ` Johannes Stezenbach
2002-10-17 13:32                       ` Gleb O. Raiko
2002-10-17 14:13                         ` Johannes Stezenbach
2002-10-16 18:11         ` Johannes Stezenbach
2002-10-16 18:23           ` Johannes Stezenbach
2002-10-17 11:57           ` Maciej W. Rozycki
2002-10-17 13:25             ` Johannes Stezenbach
2002-10-15 15:17     ` Maciej W. Rozycki
2002-10-15 16:50       ` Johannes Stezenbach

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=20021015172108.GD21220@convergence.de \
    --to=js@convergence.de \
    --cc=kevink@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@ds2.pg.gda.pl \
    /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