netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] [IPV4] route: Dynamic hash table sizing.
Date: Tue, 15 Aug 2006 01:35:41 -0700 (PDT)	[thread overview]
Message-ID: <20060815.013541.13768684.davem@davemloft.net> (raw)
In-Reply-To: <20060809.041452.102575985.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 09 Aug 2006 04:14:52 -0700 (PDT)

> From: Eric Dumazet <dada1@cosmosbay.com>
> Date: Wed, 9 Aug 2006 12:09:28 +0200
> 
> > On Wednesday 09 August 2006 09:53, David Miller wrote:
> > 
> > > +	if (atomic_read(&ipv4_dst_ops.entries) >= (hmask + 1) &&
> > > +	    (hmask + 1) < ip_rt_hashsz_limit)
> > > +		schedule_work(&rtcache_work);
> > > +	return 0;
> > >  }
> > >
> > 
> > I wonder if you should not replicate this test (against (hmask + 1) < 
> > ip_rt_hashsz_limit) in rtcache_resize() itself, because we might end calling 
> > rthash_new_size() while (hmask +1 ) = ip_rt_hashsz_limit
> 
> That's a good point, let me think about that.

Ok, I don't think this is an issue.

schedule_work() will only cause one invocation of rthash_new_size()
even if you call schedule_work() several times before the actual
workqueue invocation of rtcache_new_size().

      reply	other threads:[~2006-08-15  8:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09  7:49 [PATCHSET]: Dymamic route cache hash sizing David Miller
2006-08-09  7:53 ` [PATCH 1/2]: [IPV4] route: Locking infrastructure for dynamic routing cache sizing David Miller
2006-08-09 11:31   ` Herbert Xu
2006-08-09 23:05     ` David Miller
2006-08-09  7:53 ` [PATCH 2/2] [IPV4] route: Dynamic hash table sizing David Miller
2006-08-09  8:32   ` Eric Dumazet
2006-08-09  9:09     ` David Miller
2006-08-09 10:09   ` Eric Dumazet
2006-08-09 10:12     ` Michael Tokarev
2006-08-09 10:18       ` Evgeniy Polyakov
2006-08-09 11:14     ` David Miller
2006-08-15  8:35       ` 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=20060815.013541.13768684.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dada1@cosmosbay.com \
    --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).