All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-help] Time for rt_mutex_acquire
@ 2007-08-17 12:13 Dirk Eibach
  2007-08-17 12:45 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Dirk Eibach @ 2007-08-17 12:13 UTC (permalink / raw)
  To: Xenomai help

gilles.chanteperdrix@xenomai.org wrote:
> On 8/17/07, Dirk Eibach <eibach@domain.hid> wrote:
>> gilles.chanteperdrix@xenomai.org wrote:
>>> Dirk Eibach wrote:
>>>  > Hello,
>>>  >
>>>  > I'm wondering how long a rt_mutex_acquire is supposed to take on a PPC405
>>>  > platform. I'm getting times about 50 usec here, which is too much for my
>>>  > application. Is anything wrong in my kernel/xenomai configuration or is
>>>  > this time to expected?
>>>
>>> How do you measure this ? Are you sure the mutex is free when you try to
>>> acquire it ?
>>>
>> I prepared a small testcase. It shows about 8.300 ticks, which is about 30
>> usec on my platform (266MHz).
> 
> Did you try to call ppc_getcounter twice in a raw to measure the
> overhead of this function ?

Calling ppc_getcounter twice in a raw results in 116 ticks.

Cheers.
-- 
Dirk Eibach
Entwicklung
Guntermann & Drunck GmbH Systementwicklung





^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [Xenomai-help] (WARNING!!! PGP with incorrect signature) Re: Time
@ 2007-08-20 14:48 Fillod Stephane
  0 siblings, 0 replies; 5+ messages in thread
From: Fillod Stephane @ 2007-08-20 14:48 UTC (permalink / raw)
  To: Dirk Eibach; +Cc: Xenomai help

Jan Kiszka wrote:
>> Dirk Eibach wrote:
>> I'm wondering how long a rt_mutex_acquire is supposed to take on a
PPC405
>> platform. I'm getting times about 50 usec here, which is too much for
my
>> application. Is anything wrong in my kernel/xenomai configuration or
is
>> this time to expected?
[...]
> Still not really short, but it is a full syscall in the end. Anyone
with
> platform experience around to comment on the numbers?

My guess would be that rt_mutex_acquire always takes a syscall,
regardless 
the state of the mutex. When the most common case is an unlocked mutex, 
this hurts on low end platforms. Reading the code, it looks like this is

confirmed by src/skins/native/mutex.c, at least in version 2.3.2.

I remember this issue was raised couple of month ago in this thread[1].
Xenomai needs an implementation of fast acquisition path for mutexes,
along the principle of FUTEX but independent[2] from it. Maybe 
someone is already working it?

[1] https://mail.gna.org/public/xenomai-help/2007-05/msg00105.html
[2] https://mail.gna.org/public/xenomai-help/2007-05/msg00120.html

Regards
-- 
Stephane


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-20 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 12:13 [Xenomai-help] Time for rt_mutex_acquire Dirk Eibach
2007-08-17 12:45 ` Jan Kiszka
2007-08-17 13:01   ` [Xenomai-help] (WARNING!!! PGP with incorrect signature) Re: Time Dirk Eibach
2007-08-17 14:36     ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2007-08-20 14:48 Fillod Stephane

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.