netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH + RFC] neighbour/ARP cache scalability
Date: Tue, 21 Sep 2004 20:31:18 -0700	[thread overview]
Message-ID: <20040921203118.734a0a7e.davem@davemloft.net> (raw)
In-Reply-To: <20040920225140.GH1307@sunbeam.de.gnumonks.org>


Ok Harald, I did some snooping around and here is what
I've come up with.

1) We have 5 or 6 implementations of "walk neighbour hash
   table in sequence", that's rediculious and is the only
   reason that hashtable layout or number of entries is
   even known by code outside of net/core/neighbour.c

   In fact, many cases get it wrong :(  For example, the
   ARP seq_file stuff locks the normal hash table correctly
   but does zero locking when traversing the pneigh hashes.
   Oops.  Another reason to put this logic in a common spot.

   So I think the first thing to do is to write table
   walker functions generically inside of net/core/neighbour.c

   This is the first step.

1.5) tbl->ops->hash() should return the raw hash, the caller
     will do the necessary masking.

     At this point, there is no reason to declare
     {P,}NEIGH_HASHMASK in net/neighbour.h

2) We should size these hash table dynamically, growing them
   at neigh_create() time.

   This makes the most sense, and the scheme is similar to how
   net/ipv4/fib_hash.c works, for example.

3) If we have a sysctl for this stuff at all, it will be for
   the limit of the hash table growth, but I don't think that
   is necessary given #2

I like the jenkins hash change and yes I think it should be applied
elsewhere too.

I'll work on the set of patches implementing the above tomorrow
and will send it to the list for review and commentary.

  parent reply	other threads:[~2004-09-22  3:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20 22:51 [PATCH + RFC] neighbour/ARP cache scalability Harald Welte
2004-09-21  6:29 ` David S. Miller
2004-09-21  7:04 ` Andre Tomt
2004-09-21  7:37 ` Robert Olsson
2004-09-21  8:58 ` Andi Kleen
2004-09-21 11:19 ` Pekka Savola
2004-09-21 13:49   ` Harald Welte
2004-09-21 14:10     ` Pekka Savola
2004-09-21 15:14     ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-21 15:36       ` Robert Olsson
2004-09-21 15:59         ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-21 15:58       ` Pekka Savola
2004-09-21 16:04         ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-21 16:39           ` Tim Gardner
2004-09-21 17:31             ` Andi Kleen
2004-09-21 17:58               ` Tim Gardner
2004-09-21 18:15                 ` Andi Kleen
2004-09-21 20:34                   ` Harald Welte
2004-09-21 20:58                     ` Tim Gardner
2004-09-22  1:14                       ` Harald Welte
2004-09-22  3:31 ` David S. Miller [this message]
2004-09-22 11:14   ` Harald Welte
2004-09-24  5:53     ` David S. Miller
2004-09-24  7:14     ` Glen Turner
2004-09-24  5:47   ` David S. Miller

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=20040921203118.734a0a7e.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=laforge@gnumonks.org \
    --cc=netdev@oss.sgi.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).