Skip to contentSkip to conversation

Linux 2.6 Real Time Kernel

ANNOUNCE Vadim Lebedev 2 participants 2 messages Oct 11, 2004

lore
Share & tools
lore
#0 lore raw

Sven-Thorsten Dietrich <[email protected]> wrote in message news:<[email protected]>...

Quoted 2 lines

Announcing the availability of prototype real-time (RT) enhancements to the Linux 2.6 kernel.

Reading the sources i believe that __p_mutex_up is not constant time operation because of __p_mutex_down....

It is clear that
__p_mutex_down is not constant time operation because of insertion into the priority-sorted sleepers list. However both __p_mutex_down and __p_mutex_up are synchronize on the same global spinlock (m_spin_lock) .... so if the __p_mutex_down is holding this spinlock while inserting NO other process(or) is able to perform any __p_mutex operation...

Maybe the better idea would be to have a per-mutex spinlock? or even better, given that the task->rt_priority have a finite range maybe each mutex can have a table of sleeper lists indexed by rt_priority?

Vadim

#1 lore raw
Quoted 9 lines · Vadim Lebedev

Sven-Thorsten Dietrich <[email protected]> wrote in message news:<[email protected]>...

Quoted 2 lines

Announcing the availability of prototype real-time (RT) enhancements to the Linux 2.6 kernel.

Reading the sources i believe that __p_mutex_up is not constant time operation because of __p_mutex_down....

Quoted 7 lines

It is clear that
__p_mutex_down is not constant time operation because of insertion into the priority-sorted sleepers list. However both __p_mutex_down and __p_mutex_up are synchronize on the same global spinlock (m_spin_lock) .... so if the __p_mutex_down is holding this spinlock while inserting NO other process(or) is able to perform any __p_mutex operation...

Current pmutex implementation was chosen only as prototype implementation. kmutex abstraction layer allows to switch easily between any (alternative) mutex implementations and to choose optimal one on a benchmarking basis.

Quoted 15 lines

Maybe the better idea would be to have a per-mutex spinlock? or even better, given that the task->rt_priority have a finite range maybe each mutex can have a table of sleeper lists indexed by rt_priority?

Vadim
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/