[Top] [All Lists]

Re: userspace spinlocks

To: Ralf Baechle <>
Subject: Re: userspace spinlocks
From: Florian Lohoff <>
Date: Wed, 1 Nov 2000 10:09:28 +0100
Cc: Jun Sun <>,
In-reply-to: <>; from on Tue, Oct 31, 2000 at 09:14:31PM +0100
Organization: rfc822 - pure communication
References: <> <> <>
User-agent: Mutt/1.0.1i
On Tue, Oct 31, 2000 at 09:14:31PM +0100, Ralf Baechle wrote:
> But what is the better alternative?  Emulating ll/sc is a generic facility.
> Aside of making that more efficient the only idea I have is putting entire
> atomic operations into the kernel such that the standard case should result
> in at most one exception to be handled in the kernel.

Its just that i fell over db-2.7.7 which told me on configure that
it cant find "spinlocks" for this architecture - I had a closer look
now and it seems they have asm files for each cpu type on how to 
implement the atomic "test and set" logic. But nothing for mips.
There is a long README stating that there is no real portable way
on how to do locking and if no architecture atomic "test and set" logic
would be available they would use some complicated fnctl semantics.

> Btw, could somebody put a counter into the ll/sc emulator and test how
> often it gets called on a R3000 machine?

I hope never Sir


    466         /*
    467          * TODO: compute physical address from vaddr
    468          */
    469         panic("ll: emulation not yet finished!");

Florian Lohoff                     +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

<Prev in Thread] Current Thread [Next in Thread>