netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Dushan Tcholich" <dusanc@gmail.com>,
	"David Miller" <davem@davemloft.net>
Cc: romieu@fr.zoreil.com, hancockr@shaw.ca, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org
Subject: Re: [PATCH] bridge: don't allow setting hello time to zero
Date: Mon, 8 Sep 2008 15:33:37 -0700	[thread overview]
Message-ID: <20080908153337.002e1401@extreme> (raw)
In-Reply-To: <a08621850809081435g6c0c9d5bwdd8cf937eec9e2db@mail.gmail.com>

On Mon, 8 Sep 2008 23:35:19 +0200
"Dushan Tcholich" <dusanc@gmail.com> wrote:

> On Mon, Sep 8, 2008 at 10:46 PM, David Miller <davem@davemloft.net> wrote:
> > From: Stephen Hemminger <shemminger@vyatta.com>
> > Date: Thu, 4 Sep 2008 15:47:09 -0700
> >
> >> The bridge hello time can't be safely set to values less than 1 second,
> >> otherwise it is possible to end up with a runaway timer.
> >>
> >> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> > Applied, thanks Stephen.
> >
> > I added more information to the commit message so that Dushan's
> > incredibly contribution to this bug getting fixed are mentioned.
> > I don't see how we would have figured out Bridging as even the
> > cause without his detective work.  So it's definitely wrong not
> > to give him at least some mention in the commit message :-/
> >
> 
> I don't know what to say :)
> 
> Thank you
> > bridge: don't allow setting hello time to zero
> >
> > Dushan Tcholich reports that on his system ksoftirqd can consume
> > between %6 to %10 of cpu time, and cause ~200 context switches per
> > second.
> >
> A little nitpick: 200 times greater context switch rate :), like
> 100000 per second.
> 
> > He then correlated this with a report by bdupree@techfinesse.com:
> >
> >        http://marc.info/?l=linux-kernel&m=119613299024398&w=2
> >
> > and the culprit cause seems to be starting the bridge interface.
> > In particular, when starting the bridge interface, his scripts
> > are specifying a hello timer interval of "0".
> >
> > The bridge hello time can't be safely set to values less than 1
> > second, otherwise it is possible to end up with a runaway timer.
> 
> Btw. is there a way to make the command to turn STP off work too?
> brctl stp br0 off
> Because AFAIK if I shut down STP the hello timer should shut down too,
> but it still continues to work.
> 
> Thank you for your time and effort
> 
> Dushan Tcholich
>

The basics:
* Hello timer is always enabled
* STP defaults to off unless you turn it on
* Turn STP on/off with brctl.

In the existing design, the hello timer always runs, even when STP
is not turned on. If STP is not enabled, the packet is just never
created.  Fixing it would not be hard (or gain much), but would have
to deal with complex lock ordering and timer problems, so it isn't
worth fixing for current releases.


  reply	other threads:[~2008-09-08 22:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.wTMiBcGRgw2fBtdHwtX7y0lkc8s@ifi.uio.no>
     [not found] ` <48975BD3.6040709@shaw.ca>
2008-08-04 20:37   ` ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 Dushan Tcholich
2008-08-07 18:58     ` Francois Romieu
2008-08-10 19:00       ` Dushan Tcholich
2008-08-11  7:53         ` Dushan Tcholich
2008-08-30  1:48           ` Dushan Tcholich
2008-08-31  8:51             ` Dushan Tcholich
2008-08-31 17:05               ` Stephen Hemminger
2008-08-31 17:43                 ` [RFC] bridge: STP timer management range checking Stephen Hemminger
2008-08-31 22:02                   ` Alan Cox
2008-08-31 23:29                     ` Stephen Hemminger
2008-09-01  8:38                       ` Alan Cox
2008-09-02 16:40                         ` Rick Jones
2008-09-02 23:41                           ` David Miller
2008-09-03  0:00                             ` Rick Jones
2008-09-01  2:25                   ` Valdis.Kletnieks
2008-09-03  0:28                   ` David Miller
2008-09-04 22:47                   ` [PATCH] bridge: don't allow setting hello time to zero Stephen Hemminger
2008-09-08 20:46                     ` David Miller
2008-09-08 21:35                       ` Dushan Tcholich
2008-09-08 22:33                         ` Stephen Hemminger [this message]
2008-08-31 19:14                 ` ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 Dushan Tcholich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080908153337.002e1401@extreme \
    --to=shemminger@vyatta.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dusanc@gmail.com \
    --cc=hancockr@shaw.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).