On Thursday 13 August 2009 05:17:13 Michael Schnell wrote:
> Hi experts,

might be better to start the thread again but include lkml this time

> I am planning to implement a Futex on the upcoming MMU-enabled NIOS
> architecture.

futexes dont require a MMU.  the FRV port has proved this i believe.

> Now in the Kernel code in "linux-2.6/arch/x86/include/asm/futex.h" there
> are two different implementations for some atomic operations for the Futex:

there is an include/asm-generic/futex.h and i pointed out that using 
sh/include/asm/futex.h, we could create a default generic UP version by 
turning off interrupts for atomic code:
http://lkml.org/lkml/2009/7/3/70

> "futex_atomic_op_inuser()"    and
> "futex_atomic_cmpxhg__inatomic()"
>
> "futex_atomic_op_inuser()" seemingly accesses user space data while
> being run in Kernel space (doing the .section __ex_table trick).
>
> Questions:
>
> * Is this correct ? *
>
> * In a non-SMP environment do we need to use really atomic code here, *
> * or does futex_atomic_op_inuser() run with interrupt disabled, anyway?*
>
> * When we are doing futex_atomic_op_inuser(), is this Kernel code *
> * running in system mode so that we can disable the interrupt *
> * do protect the atomic code in a non-SMP System ? *
>
> * are all the operations implemented there really necessary *
> * or just "nice to have" ? *
>
>
> What is "futex_atomic_cmpxhg__inatomic()" used for ?
> (futex_atomic_op_inuser() does not implement the "compare-and-exchange"
> paradigm).
>
> * futex_atomic_cmpxhg__inatomic() accesses the Futex without *
> * doing the user-space-access-trick, so here, the MMU *
> * seems to be in User mode configuration *
> * So when / how does the Kernel use it ? *

these are questions better suited for lkml
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to