Re: [patch] SMP races in the timer code, timer-fix-2.6.0-test7-A0

From: Manfred Spraul
Date: Sat Oct 11 2003 - 10:02:18 EST


Ingo wrote:

fixing this second race is hard - it involves a heavy race-check operation
that has to lock all bases, and has to re-check the base->running_timer
value, and timer_pending condition atomically.


What about moving the "timer running" information into the timer_list, instead of keeping it in the base?
For example base=0 means neither running nor pending. base=1 means running, but not pending, and pointers mean pending on the given base.

This would allow an atomic test without the brute force locking.

-- Manfred


-
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/