* sysmips syscall
@ 2000-11-18 1:28 rajesh.palani
2000-11-18 1:28 ` rajesh.palani
2000-11-18 10:59 ` Ralf Baechle
0 siblings, 2 replies; 7+ messages in thread
From: rajesh.palani @ 2000-11-18 1:28 UTC (permalink / raw)
To: linux-mips, linux-mips
[-- Attachment #1: MEMO 11/17/00 19:26:59 --]
[-- Type: text/plain, Size: 661 bytes --]
Hi,
The following lines appear in the linuxthreads/sysdeps/mips/pt-machine.h file in version
LinuxThreads 2.1.2:
TODO: This version makes use of MIPS ISA 2 features. It won't
work on ISA 1. These machines will have to take the overhead of
a sysmips(MIPS_ATOMIC_SET, ...) syscall which isn't implemented
yet correctly. There is however a better solution for R3000
uniprocessor machines possible.
My questions are:
1. Is the sysmips syscall implemented correctly yet?
2. What is the better solution for R3000 uniprocessor machines?
3. Does anyone have a patch for LinuxThreads that supports MIPS ISA 1?
Thanks and regards,
Rajesh
^ permalink raw reply [flat|nested] 7+ messages in thread
* sysmips syscall
2000-11-18 1:28 sysmips syscall rajesh.palani
@ 2000-11-18 1:28 ` rajesh.palani
2000-11-18 10:59 ` Ralf Baechle
1 sibling, 0 replies; 7+ messages in thread
From: rajesh.palani @ 2000-11-18 1:28 UTC (permalink / raw)
To: linux-mips, linux-mips
[-- Attachment #1: MEMO 11/17/00 19:26:59 --]
[-- Type: text/plain, Size: 661 bytes --]
Hi,
The following lines appear in the linuxthreads/sysdeps/mips/pt-machine.h file in version
LinuxThreads 2.1.2:
TODO: This version makes use of MIPS ISA 2 features. It won't
work on ISA 1. These machines will have to take the overhead of
a sysmips(MIPS_ATOMIC_SET, ...) syscall which isn't implemented
yet correctly. There is however a better solution for R3000
uniprocessor machines possible.
My questions are:
1. Is the sysmips syscall implemented correctly yet?
2. What is the better solution for R3000 uniprocessor machines?
3. Does anyone have a patch for LinuxThreads that supports MIPS ISA 1?
Thanks and regards,
Rajesh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysmips syscall
2000-11-18 1:28 sysmips syscall rajesh.palani
2000-11-18 1:28 ` rajesh.palani
@ 2000-11-18 10:59 ` Ralf Baechle
2000-11-18 13:46 ` Keith Owens
1 sibling, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2000-11-18 10:59 UTC (permalink / raw)
To: rajesh.palani; +Cc: linux-mips, linux-mips
On Fri, Nov 17, 2000 at 07:28:50PM -0600, rajesh.palani@philips.com wrote:
> The following lines appear in the linuxthreads/sysdeps/mips/pt-machine.h file in version
> LinuxThreads 2.1.2:
>
> TODO: This version makes use of MIPS ISA 2 features. It won't
> work on ISA 1. These machines will have to take the overhead of
> a sysmips(MIPS_ATOMIC_SET, ...) syscall which isn't implemented
> yet correctly. There is however a better solution for R3000
> uniprocessor machines possible.
>
> My questions are:
> 1. Is the sysmips syscall implemented correctly yet?
Yes.
> 2. What is the better solution for R3000 uniprocessor machines?
You can base a spinlock implementation on the fact that the register k0
will be left at a value != zero after any exception, also including context
switches.
Problem: this solution breaks silently on multiproessor systems.
> 3. Does anyone have a patch for LinuxThreads that supports MIPS ISA 1?
glibc 2.2's pthread will do that out of the box.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysmips syscall
2000-11-18 10:59 ` Ralf Baechle
@ 2000-11-18 13:46 ` Keith Owens
2000-11-18 14:13 ` Ralf Baechle
2000-11-18 17:26 ` Alan Cox
0 siblings, 2 replies; 7+ messages in thread
From: Keith Owens @ 2000-11-18 13:46 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, linux-mips
On Sat, 18 Nov 2000 11:59:09 +0100,
Ralf Baechle <ralf@oss.sgi.com> wrote:
>You can base a spinlock implementation on the fact that the register k0
>will be left at a value != zero after any exception, also including context
>switches.
>
>Problem: this solution breaks silently on multiproessor systems.
Use Dekker's algorithm between systems. It requires cache coherent
memory but does not need any inter cpu locking mechanisms.
http://www.cs.wvu.edu/~jdm/classes/cs356/notes/mutex/Dekker.html
describes the algorithm for the two cpu case. It assumes no preemption
on each cpu so it has to be modified to handle interrupts. Add a local
lock so you are the only code on this processor trying to use Dekker
between processors.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysmips syscall
2000-11-18 13:46 ` Keith Owens
@ 2000-11-18 14:13 ` Ralf Baechle
2000-11-18 17:26 ` Alan Cox
1 sibling, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2000-11-18 14:13 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-mips, linux-mips
On Sun, Nov 19, 2000 at 12:46:19AM +1100, Keith Owens wrote:
> On Sat, 18 Nov 2000 11:59:09 +0100,
> Ralf Baechle <ralf@oss.sgi.com> wrote:
> >You can base a spinlock implementation on the fact that the register k0
> >will be left at a value != zero after any exception, also including context
> >switches.
> >
> >Problem: this solution breaks silently on multiproessor systems.
>
> Use Dekker's algorithm between systems. It requires cache coherent
> memory but does not need any inter cpu locking mechanisms.
>
> http://www.cs.wvu.edu/~jdm/classes/cs356/notes/mutex/Dekker.html
> describes the algorithm for the two cpu case. It assumes no preemption
> on each cpu so it has to be modified to handle interrupts. Add a local
> lock so you are the only code on this processor trying to use Dekker
> between processors.
We're talking about a algorithem to implement atomic operations only in
userspace. There is Dekker and few improved variants of it. They all
got in common that they're performing badly for an increasing number of
threads even for the no-contention case. And non-constant memory
requirements which would require further changes to glibc. So I consider
this whole family of algorithems to be a entirely theoretical construct.
Which is why we're thinking about those crude hacks.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysmips syscall
2000-11-18 13:46 ` Keith Owens
2000-11-18 14:13 ` Ralf Baechle
@ 2000-11-18 17:26 ` Alan Cox
2000-11-18 17:26 ` Alan Cox
1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2000-11-18 17:26 UTC (permalink / raw)
To: Keith Owens; +Cc: Ralf Baechle, linux-mips, linux-mips
> Use Dekker's algorithm between systems. It requires cache coherent
> memory but does not need any inter cpu locking mechanisms.
Cache coherent and write ordered
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysmips syscall
2000-11-18 17:26 ` Alan Cox
@ 2000-11-18 17:26 ` Alan Cox
0 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2000-11-18 17:26 UTC (permalink / raw)
To: Keith Owens; +Cc: Ralf Baechle, linux-mips, linux-mips
> Use Dekker's algorithm between systems. It requires cache coherent
> memory but does not need any inter cpu locking mechanisms.
Cache coherent and write ordered
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2000-11-18 17:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-18 1:28 sysmips syscall rajesh.palani
2000-11-18 1:28 ` rajesh.palani
2000-11-18 10:59 ` Ralf Baechle
2000-11-18 13:46 ` Keith Owens
2000-11-18 14:13 ` Ralf Baechle
2000-11-18 17:26 ` Alan Cox
2000-11-18 17:26 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox