[RFC][PATCH] TIMER_BH-less smptimers

From: Dipankar Sarma (dipankar@in.ibm.com)
Date: Thu May 16 2002 - 08:24:48 EST


I have been experimenting with Ingo's smptimers and I ended up
extending it a little bit. I would really appreciate comments
on whether these things make sense or not.

The major changes are -

1. I removed TIMER_BH. The vector is defined but not used.

2. Not having the TIMER_BH requires additional work for
serializing old protocol code (deliver_to_old_ones()) to
work with new timers. The protocol code is already serialized
using net_bh_lock. So, I used it to serialize old protocol
code with new timers.

3. Ingo's run_local_timers() had to do all sorts of locking
to keep legacy serialization happy. I just added net_bh_lock
to that list. This makes sure that timers don't run with
old protocol code.

4. When legacy locking fails in run_local_timers(), I use a
per-cpu tasklet to run the timers for that cpu. This tasklet
also uses the same locking scheme to support legacy stuff.

5. I expanded it to all smp architectures that I could see,
but no testing has been done yet for non-i386. As and when
I can boot 2.5 kernels on ia64 and ppc, I will test it.
I am reasonably sure I didn't get mips right, if not others.

The patch has been tested with *2.5.14* (applies cleanly) and
ltp in a 4CPU i386. Unfortunately, the legacy code still requires
us to do serialize timers with global locks.

Thanks

-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.


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



This archive was generated by hypermail 2b29 : Thu May 23 2002 - 22:00:12 EST