|
From: Polina D. <pd...@gm...> - 2008-12-05 17:27:34
|
Hi, I read in your paper that threads switch every 100, 000 blocks or on a system call. I would like to make them switch faster, for example, every block. Is there a way I can do this? Even if I can indeed do this, will I suffer a huge locking - unlocking and/or switching overhead? Thank you. Polina |
|
From: Nicholas N. <nj...@cs...> - 2008-12-05 22:38:27
|
On Fri, 5 Dec 2008, Polina Dudnik wrote:
> I read in your paper that threads switch every 100, 000 blocks or on a
> system call. I would like to make them switch faster, for example,
> every block. Is there a way I can do this? Even if I can indeed do
> this, will I suffer a huge locking - unlocking and/or switching
> overhead? Thank you.
Try changing this constant in coregrind/m_scheduler/scheduler.c:
/* Defines the thread-scheduling timeslice, in terms of the number of
basic blocks we attempt to run each thread for. Smaller values
give finer interleaving but much increased scheduling overheads. */
#define SCHEDULING_QUANTUM 100000
You'll have to determine the overhead yourself via experimentation.
Nick
|