netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bcrl@kvack.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] fib_info_hashfn leads to long hash chains
Date: Mon, 07 May 2007 16:09:11 -0700 (PDT)	[thread overview]
Message-ID: <20070507.160911.35663865.davem@davemloft.net> (raw)
In-Reply-To: <20070429150336.GC10824@kvack.org>

From: Benjamin LaHaise <bcrl@kvack.org>
Date: Sun, 29 Apr 2007 11:03:36 -0400

> Hello
> 
> The patch below fixes a case where fib_find_info() is consume excessive 
> amounts of CPU during the creation of 10000 PPP interfaces.  In access 
> servers, each point to point link has the same local address, but a different 
> destination and interface.  Because the device is not included in the hash 
> calculation, the chain grows excessively large and we end up spinning the 
> CPU walking the list.  As near as I can tell, this shouldn't have any negative 
> sideeffects, but someone with a better understanding of fib_semantics.c will 
> need to check over it.  Cheers,

fib_create_info() makes sure that fi->fib_nhs is always at least one.
So the conditional can be removed.  After a fib_info is create, it's
fi->fib_nhs is immutable, it doesn't change.

In fact there are some checks for fi->fib_nhs == 0 elsewhere in this
code, those are bogus too, and I imagine you saw those when coding
up this patch. :-)

      reply	other threads:[~2007-05-07 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29 15:03 [PATCH] fib_info_hashfn leads to long hash chains Benjamin LaHaise
2007-05-07 23:09 ` David Miller [this message]

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=20070507.160911.35663865.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bcrl@kvack.org \
    --cc=netdev@vger.kernel.org \
    /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).