[Bridge] [PATCH 2.6.23.1] Kill STP hello timer if STP is not enabled

Michał Mirosław mirq-linux at rere.qmqm.pl
Tue Oct 16 10:11:05 PDT 2007


On Tue, Oct 16, 2007 at 09:40:03AM -0700, Stephen Hemminger wrote:
> On Mon, 15 Oct 2007 23:48:12 +0200
> Michał Mirosław <mirq-linux at rere.qmqm.pl> wrote:
> > Quick CPU eater kill. This might be not the best fix possible.
> > Without this patch, hello_timer is firing 250 times/sec and eating about
> > 8% CPU time on my an otherwise idle system (dynticks enabled). 2.6.21.5 was
> > even worse - 20% (HZ=1000). (br->hello_time was supposedly 0 when STP was
> > disabled).
> Good idea, but patch needs work.
> 
> The default hello_time is 2 seconds, so if it is going up to 250/sec then
> maybe other root bridge is updating it.  
> I don't see where hello_time gets set to 0 if STP disabled?

Huh! I now checked my config and it turned out, that I set hello_time=0
there (maybe to disable hellos...) and forgot about it. It's removed now -
just in case.

> My preference would be to have hello_time set to zero if not running STP
> and not start timer if it is zero.

What about:
brctr stp br0 off
brctr stp br0 on

This sequence would disable HELLO's unless you would keep backup of this
field and restore it while turning STP back on.

> Also, the check for not sending config BPDU is separate. We do was time
> deciding to send BPDU when STP is disabled, the existing test could
> just be moved up the call chain.

That would move the STP logic to br_device.c. It's mixed up anyway, but
maybe I'm missing some point - I expected that by disabling STP I'm
turning my Linux box to a dump switch, that doesn't even care about
other switches nor forwarding loops that may happen (and so doesn't need
to send nor receive any BPDUs).

  -- Michal Miroslaw


More information about the Bridge mailing list