Re: [RFC][PATCH] TIMER_BH-less smptimers

Dipankar Sarma (dipankar@in.ibm.com)
Tue, 21 May 2002 11:48:50 +0530


On Mon, May 20, 2002 at 11:21:09PM +0200, J.A. Magallon wrote:
>
> >> 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.
> >
> >I tried it out and found that we were context switching like crazy.
> >It seems we were always running the timers out of a tasklet because
> >we never unlocked the net_bh_lock.
> >
>
> The patch for 2.4 in
>
> http://people.redhat.com/mingo/scalable-timers-patches/
>
> does not acquire net_bh_lock. Then I suppose it does not apply to that ?

No. Ingo's smptimers doesn't have this problem. However I am not
sure if this patch has timers completely serialized with respect
to old protocol code that ran from NET_BH earlier. See
deliver_to_old_ones() in net/core/dev.c. Unless I am missing something
big, disabling TIMER_BH there doesn't stop timers from firing
in run_local_timers().

> Can I try your patch for 2.5 on 2.4 or is there any infrastructure
> missing ?

Only 2.5ish thing I use is the per-cpu area APIs from Rusty for
the per-cpu tasklet in timer.c. You can replace it by
an array of NR_CPUS tasklets each cache line aligned.

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/