Re: [PATCH] Force rcutorture tasks to spread over CPUs

From: Josh Triplett
Date: Wed Jun 13 2007 - 12:50:09 EST


Paul E. McKenney wrote:
> Of late, the scheduler seems to have decided to make things too easy for
> RCU -- on some configurations, all of the rcutorture tasks end up on the
> same CPU, which doesn't do a very good job of torturing RCU. This patch
> helps the scheduler spread these tasks out by forcing a 20-millisecond
> burst of CPU-bound execution on each of rcutorture's tasks, which seems
> to work reasonably well in practice.

Given the scheduler behavior you observed, this seems reasonable to me, and it
seems reasonable to do this balancing by default. You might consider adding a
module param to set the timeout, and disable the barrier code entirely when 0,
so people can still test the previous behavior.

Independently from this change, you might also consider adding a way to set
CPU affinity for rcutorture threads. This would allow explicitly spreading
readers and writers across all CPUs, and possibly also allow clumping these
threads together on CPUs in bug-revealing ways.

> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

Acked-by: Josh Triplett <josh@xxxxxxxxxx>

- Josh Triplett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/