Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: ralf@uni-koblenz.de
To: Rik van Riel <H.H.vanRiel@phys.uu.nl>
Cc: Vladimir Roganov <roganov@niisi.msk.ru>,
	linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com,
	linux-mips@vger.rutgers.edu, linux-kernel@vger.rutgers.edu
Subject: Re: get_mmu_context()
Date: Thu, 15 Oct 1998 01:49:55 +0200	[thread overview]
Message-ID: <19981015014955.K392@uni-koblenz.de> (raw)
In-Reply-To: <Pine.LNX.3.96.981014144230.10483B-100000@mirkwood.dummy.home>; from Rik van Riel on Wed, Oct 14, 1998 at 02:45:45PM +0000

On Wed, Oct 14, 1998 at 02:45:45PM +0000, Rik van Riel wrote:

> > Ok, here is a draft version of an agressively optimized version of
> > get_mmu_context().  I just didn't like the idea of referencing
> > global variables in get_mmu_context() if avoidable.  The code below
> > will work on both R3000 and R4000 with no performance penalty for
> > being generic.  The trick is to patch the operands of two machine
> > instructions at runtime, shoot me.
> 
> ROFL! No offense to the code, I'm sure it works, but
> this just _has_ to be the funniest piece of source
> code to appear on the lists this month...
> 
> Self-modifying code -- this is so much fun :)

Lame example of self modifying code, it doesn't even modify the instructions
and only on bootup.

> > extern inline void r3000_asid_setup(void)
> > 
> > extern inline void r4xx0_asid_setup(void)
> 
> Very nice Ralf... My compliments on this piece
> of code -- I can only imagine the amount of
> phantasy and inspiration that was needed to
> create it...

Guess why I had to post it :-)  Seriously, I didn't like the proposed
alternative and some of the older machines which have main memory latencies
like 1400ns for shure win each time when _not_ using memory.  Even in
case of a l1 hit the amount of time wasted for the load should still be
visible in context switching times.  So, no mercy.  Patch as patch can.
And maintenance isn't the issue.  I messed it up, I maintain it :-)

  Ralf

  parent reply	other threads:[~1998-10-16  2:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-13 19:59 get_mmu_context() ralf
     [not found] ` <Pine.LNX.3.96.981014144230.10483B-100000@mirkwood.dummy.home>
1998-10-14 23:49   ` ralf [this message]
     [not found] ` <3625D799.7D923FA9@niisi.msk.ru>
1998-10-15 20:21   ` get_mmu_context() ralf
     [not found]     ` <Pine.SV4.3.91.981016185136.876A-100000@mech.math.msu.su>
1998-10-18 19:53       ` get_mmu_context() Harald Koerfgen
1998-10-19 10:18         ` get_mmu_context() ralf
1998-10-20  4:07           ` get_mmu_context() Warner Losh
1998-10-20 17:31             ` get_mmu_context() ralf
1998-10-20 23:36               ` get_mmu_context() Warner Losh
1998-10-21 19:31           ` get_mmu_context() Harald Koerfgen
1998-10-19  1:29       ` get_mmu_context() ralf
1998-10-16 22:44   ` get_mmu_context() ralf
  -- strict thread matches above, loose matches on Subject: below --
1998-10-20  4:21 get_mmu_context() Ariel Faigon
1998-10-20  4:21 ` get_mmu_context() Ariel Faigon

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=19981015014955.K392@uni-koblenz.de \
    --to=ralf@uni-koblenz.de \
    --cc=H.H.vanRiel@phys.uu.nl \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mips@fnet.fr \
    --cc=linux-mips@vger.rutgers.edu \
    --cc=linux@cthulhu.engr.sgi.com \
    --cc=roganov@niisi.msk.ru \
    /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