netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net, Jarek Poplawski <jarkao2@o2.pl>
Cc: netdev@vger.kernel.org, muli@il.ibm.com
Subject: Re: [RESEND] [NET] fib_rules: Flush route cache after rule modifications
Date: Wed, 28 Mar 2007 17:49:03 +0200	[thread overview]
Message-ID: <20070328154903.GO521@postel.suug.ch> (raw)
In-Reply-To: <20070328111921.GA2703@ff.dom.local>

* Jarek Poplawski <jarkao2@o2.pl> 2007-03-28 13:19
> I hope I'm wrong, but isn't this at the cost of admins
> working with long rules' sets, which (probably) take extra
> time now?

That's right, it makes the insert and delete operation more
expensive.

A compromise would be to delay the flushing and wait for
some time (default 2 seconds) whether more rules or routes
are being added before flushing.

[NET] fib_rules: delay route cache flush by ip_rt_min_delay

Signed-off-by: Thomas Graf <tgraf@suug.ch>

Index: linux/net-2.6.22/net/decnet/dn_rules.c
===================================================================
--- linux.orig/net-2.6.22/net/decnet/dn_rules.c	2007-03-28 17:41:22.000000000 +0200
+++ linux/net-2.6.22/net/decnet/dn_rules.c	2007-03-28 17:41:39.000000000 +0200
@@ -242,7 +242,7 @@ static u32 dn_fib_rule_default_pref(void
 
 static void dn_fib_rule_flush_cache(void)
 {
-	dn_rt_cache_flush(0);
+	dn_rt_cache_flush(-1);
 }
 
 static struct fib_rules_ops dn_fib_rules_ops = {
Index: linux/net-2.6.22/net/ipv4/fib_rules.c
===================================================================
--- linux.orig/net-2.6.22/net/ipv4/fib_rules.c	2007-03-28 17:41:18.000000000 +0200
+++ linux/net-2.6.22/net/ipv4/fib_rules.c	2007-03-28 17:41:30.000000000 +0200
@@ -300,7 +300,7 @@ static size_t fib4_rule_nlmsg_payload(st
 
 static void fib4_rule_flush_cache(void)
 {
-	rt_cache_flush(0);
+	rt_cache_flush(-1);
 }
 
 static struct fib_rules_ops fib4_rules_ops = {

  reply	other threads:[~2007-03-28 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27 13:38 [RESEND] [NET] fib_rules: Flush route cache after rule modifications Thomas Graf
2007-03-27 20:57 ` David Miller
2007-03-28 11:19 ` Jarek Poplawski
2007-03-28 15:49   ` Thomas Graf [this message]
2007-03-28 18:24     ` David Miller
2007-03-28 19:34       ` Thomas Graf
2007-03-28 19:40         ` David Miller
2007-03-29 10:03         ` Jarek Poplawski
2007-03-29 10:15           ` Jarek Poplawski

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=20070328154903.GO521@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=jarkao2@o2.pl \
    --cc=muli@il.ibm.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).