Skip to contentSkip to conversation

First thoughts on fast xnsynch

Xenomai-core Jan Kiszka 2 participants 2 messages Sep 4, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi Gilles,

I spent a few brain cycles on the design of a generic fast-lock via xnsynch. The first thing was defining the lock word and going through its use cases.

You suggested to realize lock stealing directly in user space, but I don't see now how this should work reasonably. Our problem is that we would have to atomically check for the woken state AND compare the current priority against the owner ones. Imaginable only if we replicate the priorities into the lock word - but this makes things at least horribly complicated (e.g. when priorities change). So I think we have to drop this goal. Or what did you have in mind?

Jan

#1 lore raw
Quoted 6 lines · Jan Kiszka

Hi Gilles,

I spent a few brain cycles on the design of a generic fast-lock via xnsynch. The first thing was defining the lock word and going through its use cases.

Quoted 7 lines

You suggested to realize lock stealing directly in user space, but I don't see now how this should work reasonably. Our problem is that we would have to atomically check for the woken state AND compare the current priority against the owner ones. Imaginable only if we replicate the priorities into the lock word - but this makes things at least horribly complicated (e.g. when priorities change). So I think we have to drop this goal. Or what did you have in mind?

No, you are right, it is a scheduler's decition, so must be done in kernel-space.

Signature · 1 line
					    Gilles.