Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: {rd,wr}unique palcode insns
@ 1996-09-10 23:18 David Mosberger
  1996-10-04 12:22 ` Fixed ELF Linux/alpha Quake binary Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: David Mosberger @ 1996-09-10 23:18 UTC (permalink / raw)


> Does anyone know what the rdunique/wrunique unprivileged PALcode
 > traps are for?  Do they, as they appear, allow one value to be stored
 > per-thread?

Yes, the value is per (kernel-) thread.  If you look at pseudo-code
for the swpctx PALcall, you'll see that the unique value gets stored
in the "process" control block.  In Linux, the corresponding variable
is the "unique" member in processor.h:struct thread_struct.

 > How are they used in DEC Unix?

Don't know.  I don't think the architecture manual says so explicitly,
but the intent seems to be that the kernel does not interpret the
unique value in any manner.  I.e., you're free to use it in any way
you like.

 > What kind of performance hit do I take trapping to PALcode?

Switching to PALmode is "fast".  I don't have any numbers that measure
this overhead alone, but on a 175MHz Alpha (DEC 3000/600) machine the
overhead for rdps or rdunique (I forgot which) was 13 cycles (assuming
a warm cache).  Note that the Alpha CPUs have shadow registers in
PALmode, so in many cases the PALcode itself doesn't have to access
memory at all.  I don't know the implementation details, but AFAIK,
entering PALmode is not much more than flipping a bit in the CPU.  The
biggest performance hit seems to come from the various scheduling and
synchronization restrictions inside PALmode.  See the hardware
reference for all the gory details (and I mean _gory_... ;-)

 > I ask because I was thinking of changing the LinuxThreads code to use
 > this for its thread id, rather than doing some screwy stack pointer
 > lookup nonsense as is necessary for other platforms.

 > Anyone see a problem with this?

I think that is exactly what it is designed for.

	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: Fixed ELF Linux/alpha Quake binary..
@ 1996-10-04 15:38 David Mosberger-Tang
  0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 1996-10-04 15:38 UTC (permalink / raw)


>>>>> On Fri, 4 Oct 1996 15:22:51 +0300 (EET DST), Linus Torvalds <torvalds@cs.Helsinki.FI> said:

  Linus> I suspect it might be a good idea to mirror the binary
  Linus> somewhere, after having checked that it actually works. The
  Linus> ftp.cs.helsinki.fi site is just a few PC's on an ethernet, so
  Linus> don't expect it to be incredibly fast.

Can't pass on this one.  It's now also at:

	ftp://ftp.azstarnet.com/pub/linux/axp/alpha-ELF-xquake.gz

Enjoy,
	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-10-04 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-10 23:18 {rd,wr}unique palcode insns David Mosberger
1996-10-04 12:22 ` Fixed ELF Linux/alpha Quake binary Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
1996-10-04 15:38 David Mosberger-Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox