All of lore.kernel.org
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: kaber@trash.net, davem@davemloft.net, netdev@vger.kernel.org,
	johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 20/31]: pkt_sched: Perform bulk of qdisc destruction in RCU.
Date: Mon, 21 Jul 2008 07:14:39 -0400	[thread overview]
Message-ID: <1216638879.4847.210.camel@localhost> (raw)
In-Reply-To: <20080721031716.GA7535@gondor.apana.org.au>

On Mon, 2008-21-07 at 11:17 +0800, Herbert Xu wrote:

> Unfortunately the scenario that I wrote this for requires frequent
> addition/removal.

Aha - makes absolute sense then;->

> Only if you also want to share it :) In the end I patched it to
> not share it which is much easier.

I am trying to visualize: if you dont share, you must have 256K copies
then? Assuming also you have a fast lookup since that was design intent.

> Of course if you're volunteering to write the dynamic hash table
> for actions then I'd happily switch back to sharing :)

It is a unique need like you said earlier (and would require a
medium-size surgery).
How about this: if a second user shows up with such a need I could do
it.

If you knew you had a 256K entry, then you could make
NAT_TAB_MASK to be (256K-1) and you are guaranteed to get O(1) lookup if
you dont specify indices.
I know youve patched it already -havent quiet understood how and your
current solution may be better- but one other way is to have a Kconfig
option which lets the user type the size of the nat hash table size at
kernel compile time. So then a change
of the sort:
#ifdef CONFIG_HASH_SIZE
#define NAT_TAB_MASK CONFIGURED_HASH_SIZE
#else
#define NAT_TAB_MASK 15
#endif

What do you think?

cheers,
jamal


  reply	other threads:[~2008-07-21 11:14 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 12:17 [PATCH 20/31]: pkt_sched: Perform bulk of qdisc destruction in RCU David Miller
2008-07-17 12:17 ` David Miller
2008-07-17 13:03 ` Patrick McHardy
2008-07-17 13:03   ` Patrick McHardy
2008-07-17 13:12   ` David Miller
2008-07-17 13:12     ` David Miller
2008-07-17 13:48     ` Patrick McHardy
2008-07-17 22:36       ` David Miller
2008-07-17 22:36         ` David Miller
2008-07-17 23:58         ` Patrick McHardy
2008-07-17 23:58           ` Patrick McHardy
2008-07-17 13:35   ` jamal
2008-07-17 13:35     ` jamal
2008-07-17 14:02     ` Patrick McHardy
2008-07-17 22:24       ` David Miller
2008-07-17 22:24         ` David Miller
2008-07-17 23:48         ` Patrick McHardy
2008-07-17 23:48           ` Patrick McHardy
2008-07-18 13:10           ` jamal
2008-07-18 13:27             ` jamal
2008-07-18 21:05               ` David Miller
2008-07-18 21:05                 ` David Miller
2008-07-20 15:16                 ` jamal
2008-07-20 17:25                   ` David Miller
2008-07-20 17:34                     ` Tomas Winkler
2008-07-20 17:34                       ` Tomas Winkler
2008-07-20 17:35                       ` David Miller
2008-07-20 17:35                         ` David Miller
2008-07-20 22:32                     ` jamal
2008-07-20 22:32                       ` jamal
2008-07-20 23:59                       ` David Miller
2008-07-21  2:20                         ` jamal
2008-07-21 11:20                           ` jamal
2008-07-21 11:20                             ` jamal
2008-07-21 16:45                             ` David Miller
2008-07-21 11:58                           ` Herbert Xu
2008-07-21 11:58                             ` Herbert Xu
2008-07-21 13:08                             ` jamal
2008-07-21 13:08                               ` jamal
2008-07-21 13:19                               ` Herbert Xu
2008-07-21 13:56                                 ` jamal
2008-07-21 13:58                                   ` Herbert Xu
2008-07-21 15:09                                     ` David Miller
2008-07-21 15:09                                       ` David Miller
2008-07-21 15:22                                       ` Herbert Xu
2008-07-21 15:22                                         ` Herbert Xu
2008-07-21 15:26                                         ` David Miller
2008-07-21 16:16                                           ` Herbert Xu
2008-07-21 16:16                                             ` Herbert Xu
2008-07-21 16:25                                             ` David Miller
2008-07-21 16:25                                               ` David Miller
2008-07-21 16:43                                               ` Herbert Xu
2008-07-21 16:51                                                 ` David Miller
2008-07-21 17:02                                                   ` Herbert Xu
2008-07-21 17:02                                                     ` Herbert Xu
2008-07-21 17:08                                                     ` David Miller
2008-07-21 17:08                                                       ` David Miller
2008-07-21 17:11                                                       ` Herbert Xu
2008-07-21 17:11                                                         ` Herbert Xu
2008-08-22  6:56                                                         ` Herbert Xu
2008-08-22  7:16                                                           ` David Miller
2008-08-22  7:41                                                             ` Herbert Xu
2008-08-22  7:41                                                               ` Herbert Xu
2008-08-22 10:42                                                               ` David Miller
2008-08-22 10:42                                                                 ` David Miller
2008-08-22 10:47                                                                 ` Herbert Xu
2008-08-22 10:47                                                                   ` Herbert Xu
2008-08-22 13:52                                                                 ` jamal
2008-08-22 13:52                                                                   ` jamal
2008-08-22 13:43                                                           ` jamal
2008-08-22 13:43                                                             ` jamal
2008-07-21 17:35                             ` David Miller
2008-07-21 17:35                               ` David Miller
2008-07-18 17:10             ` Roland Dreier
2008-07-18 17:10               ` Roland Dreier
2008-07-20 14:58               ` jamal
2008-07-20 14:58                 ` jamal
2008-07-20 14:32         ` Herbert Xu
2008-07-20 17:20           ` David Miller
2008-07-20 14:20     ` Herbert Xu
2008-07-20 14:20       ` Herbert Xu
2008-07-20 15:35       ` jamal
2008-07-20 15:35         ` jamal
2008-07-21  0:11         ` Herbert Xu
2008-07-21  2:33           ` jamal
2008-07-21  2:33             ` jamal
2008-07-21  3:17             ` Herbert Xu
2008-07-21  3:17               ` Herbert Xu
2008-07-21 11:14               ` jamal [this message]
2008-07-21 11:36                 ` Herbert Xu
2008-07-21 11:39                   ` jamal
2008-07-21 11:39                     ` jamal
2008-07-19  3:59   ` David 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=1216638879.4847.210.camel@localhost \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=johannes@sipsolutions.net \
    --cc=kaber@trash.net \
    --cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.