From: Fan Du <fan.du@windriver.com>
To: <steffen.klassert@secunet.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net-next] flowcache: Tune per cpu flow cache shrink size
Date: Fri, 14 Mar 2014 15:42:46 +0800 [thread overview]
Message-ID: <1394782966-9792-1-git-send-email-fan.du@windriver.com> (raw)
When per cpu flow cache entries count reaches over high_watermark,
flow cache will be shrinked gently to around low_watermark, not
brutally killing most of cached entries by left only two.
Signed-off-by: Fan Du <fan.du@windriver.com>
---
net/core/flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/flow.c b/net/core/flow.c
index 31cfb365e0c6..e379cdcd699b 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -142,7 +142,7 @@ static void __flow_cache_shrink(struct flow_cache *fc,
static void flow_cache_shrink(struct flow_cache *fc,
struct flow_cache_percpu *fcp)
{
- int shrink_to = fc->low_watermark / flow_cache_hash_size(fc);
+ int shrink_to = fc->low_watermark;
__flow_cache_shrink(fc, fcp, shrink_to);
}
--
1.7.9.5
next reply other threads:[~2014-03-14 7:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 7:42 Fan Du [this message]
2014-03-14 10:26 ` [PATCH net-next] flowcache: Tune per cpu flow cache shrink size Steffen Klassert
2014-03-14 18:43 ` 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=1394782966-9792-1-git-send-email-fan.du@windriver.com \
--to=fan.du@windriver.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.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).