All of lore.kernel.org
 help / color / mirror / Atom feed
* Question regarding pthread_cond_wait/pthread_cond_signal latencies
@ 2011-05-20 11:15 Pedro Gonnet
  2011-05-22 14:53 ` Armin Steinhoff
  0 siblings, 1 reply; 11+ messages in thread
From: Pedro Gonnet @ 2011-05-20 11:15 UTC (permalink / raw)
  To: linux-rt-users

Hi guys,

I'm currently working on a shared-memory parallel Molecular Dynamics
simulation library (http://mdcore.sourceforge.net/) geared towards
multi-core systems.

The library uses pthreads (plus some OpenMP for some simple loops) and
uses pthread_cond_wait and pthread_cond_signal to coordinate a group of
worker threads.

I've been profiling the library on different machines and kernels and
have noticed that in many cases there are significant (several ms,
measured with Intel's Vtune-thing) lags between calls to
pthread_cond_signal and the waiting thread actually getting back to
work.

I've tried the Ubuntu -rt and -preempt kernels, and the whole simulation
runs twice as slowly, despite following the advice given here:

        https://rt.wiki.kernel.org/index.php/HOWTO:_Build_an_RT-application

My question is the following: which kernel (or set of configuration
options) will minimize these latencies? And if linux-rt is the answer,
in what ways do I have to be careful when porting the simulation for
this kernel?

Cheers and thanks,
Pedro





^ permalink raw reply	[flat|nested] 11+ messages in thread
* Question regarding pthread_cond_wait/pthread_cond_signal latencies
@ 2011-05-20 10:08 Pedro Gonnet
  2011-05-21 20:48 ` Mark Hounschell
  2011-05-22 18:37 ` Robert Schwebel
  0 siblings, 2 replies; 11+ messages in thread
From: Pedro Gonnet @ 2011-05-20 10:08 UTC (permalink / raw)
  To: linux-rt-users


Hi guys,

I'm currently working on a shared-memory parallel Molecular Dynamics
simulation library (http://mdcore.sourceforge.net/) geared towards
multi-core systems.

The library uses pthreads (plus some OpenMP for some simple loops) and
uses pthread_cond_wait and pthread_cond_signal to coordinate a group of
worker threads.

I've been profiling the library on different machines and kernels and
have noticed that in many cases there are significant (several ms,
measured with Intel's Vtune-thing) lags between calls to
pthread_cond_signal and the waiting thread actually getting back to
work.

I've tried the Ubuntu -rt and -preempt kernels, and the whole simulation
runs twice as slowly, despite following the advice given here:

        https://rt.wiki.kernel.org/index.php/HOWTO:_Build_an_RT-application

My question is the following: which kernel (or set of configuration
options) will minimize these latencies? And if linux-rt is the answer,
in what ways do I have to be careful when porting the simulation for
this kernel?

Cheers and thanks,
Pedro




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

end of thread, other threads:[~2011-05-22 18:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 11:15 Question regarding pthread_cond_wait/pthread_cond_signal latencies Pedro Gonnet
2011-05-22 14:53 ` Armin Steinhoff
2011-05-22 15:18   ` Armin Steinhoff
  -- strict thread matches above, loose matches on Subject: below --
2011-05-20 10:08 Pedro Gonnet
2011-05-21 20:48 ` Mark Hounschell
2011-05-21 20:51   ` Pedro Gonnet
2011-05-21 21:40     ` Rolando Martins
2011-05-22  0:44     ` Peter W. Morreale
2011-05-22 11:34       ` Pedro Gonnet
2011-05-22 13:51         ` Peter W. Morreale
2011-05-22 18:37 ` Robert Schwebel

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.