From: jamal <hadi@cyberus.ca>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>, Rick Jones <rick.jones2@hp.com>,
David Miller <davem@davemloft.net>,
therbert@google.com, netdev@vger.kernel.org, robert@herjulf.net,
andi@firstfloor.org
Subject: Re: rps perfomance WAS(Re: rps: question
Date: Fri, 16 Apr 2010 09:21:05 -0400 [thread overview]
Message-ID: <1271424065.4606.31.camel@bigi> (raw)
In-Reply-To: <1271395106.16881.3645.camel@edumazet-laptop>
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
On Fri, 2010-04-16 at 07:18 +0200, Eric Dumazet wrote:
>
> A kernel module might do this, this could be integrated in perf bench so
> that we can regression tests upcoming kernels.
Perf would be good - but even softnet_stat cleaner than the the nasty
hack i use (attached) would be a good start; the ping with and without
rps gives me a ballpark number.
IPI is important to me because having tried it before it and failed
miserably. I was thinking the improvement may be due to hardware used
but i am having a hard time to get people to tell me what hardware they
used! I am old school - I need data;-> The RFS patch commit seems to
have more info but still vague, example:
"The benefits of RFS are dependent on cache hierarchy, application
load, and other factors"
Also, what does a "simple" or "complex" benchmark mean?;->
I think it is only fair to get this info, no?
Please dont consider what i say above as being anti-RPS.
5 microsec extra latency is not bad if it can be amortized.
Unfortunately, the best traffic i could generate was < 20Kpps of
ping which still manages to get 1 IPI/packet on Nehalem. I am going
to write up some app (lots of cycles available tommorow). I still think
it is valueable.
cheers,
jamal
[-- Attachment #2: p1 --]
[-- Type: text/x-patch, Size: 1551 bytes --]
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d1a21b5..f8267fc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -224,6 +224,7 @@ struct netif_rx_stats {
unsigned time_squeeze;
unsigned cpu_collision;
unsigned received_rps;
+ unsigned ipi_rps;
};
DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
diff --git a/kernel/smp.c b/kernel/smp.c
index 9867b6b..8c5dcb7 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/cpu.h>
+#include <linux/netdevice.h>
static struct {
struct list_head queue;
@@ -158,7 +159,10 @@ void generic_exec_single(int cpu, struct call_single_data *data, int wait)
* equipped to do the right thing...
*/
if (ipi)
+{
arch_send_call_function_single_ipi(cpu);
+ __get_cpu_var(netdev_rx_stat).ipi_rps++;
+}
if (wait)
csd_lock_wait(data);
diff --git a/net/core/dev.c b/net/core/dev.c
index b98ddc6..0bbbdcf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3563,10 +3563,12 @@ static int softnet_seq_show(struct seq_file *seq, void *v)
{
struct netif_rx_stats *s = v;
- seq_printf(seq, "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ seq_printf(seq, "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
s->total, s->dropped, s->time_squeeze, 0,
0, 0, 0, 0, /* was fastroute */
- s->cpu_collision, s->received_rps);
+ s->cpu_collision, s->received_rps, s->ipi_rps);
+ s->ipi_rps = 0;
+ s->received_rps = 0;
return 0;
}
next prev parent reply other threads:[~2010-04-16 13:21 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 18:42 rps: question jamal
2010-02-08 5:58 ` Tom Herbert
2010-02-08 15:09 ` jamal
2010-04-14 11:53 ` rps perfomance WAS(Re: " jamal
2010-04-14 17:31 ` Tom Herbert
2010-04-14 18:04 ` Eric Dumazet
2010-04-14 18:53 ` jamal
2010-04-14 19:44 ` Stephen Hemminger
2010-04-14 19:58 ` Eric Dumazet
2010-04-15 8:51 ` David Miller
2010-04-14 20:22 ` jamal
2010-04-14 20:27 ` Eric Dumazet
2010-04-14 20:38 ` jamal
2010-04-14 20:45 ` Tom Herbert
2010-04-14 20:57 ` Eric Dumazet
2010-04-14 22:51 ` Changli Gao
2010-04-14 23:02 ` Stephen Hemminger
2010-04-15 2:40 ` Eric Dumazet
2010-04-15 2:50 ` Changli Gao
2010-04-15 8:57 ` David Miller
2010-04-15 12:10 ` jamal
2010-04-15 12:32 ` Changli Gao
2010-04-15 12:50 ` jamal
2010-04-15 23:51 ` Changli Gao
2010-04-15 8:51 ` David Miller
2010-04-14 20:34 ` Andi Kleen
2010-04-15 8:50 ` David Miller
2010-04-15 8:48 ` David Miller
2010-04-15 11:55 ` jamal
2010-04-15 16:41 ` Rick Jones
2010-04-15 20:16 ` jamal
2010-04-15 20:25 ` Rick Jones
2010-04-15 23:56 ` Changli Gao
2010-04-16 5:18 ` Eric Dumazet
2010-04-16 6:02 ` Changli Gao
2010-04-16 6:28 ` Tom Herbert
2010-04-16 6:32 ` Eric Dumazet
2010-04-16 13:42 ` jamal
2010-04-16 7:15 ` Andi Kleen
2010-04-16 13:27 ` jamal
2010-04-16 13:37 ` Andi Kleen
2010-04-16 13:58 ` jamal
2010-04-16 13:21 ` jamal [this message]
2010-04-16 13:34 ` Changli Gao
2010-04-16 13:49 ` jamal
2010-04-16 14:10 ` Changli Gao
2010-04-16 14:43 ` jamal
2010-04-16 14:58 ` Changli Gao
2010-04-19 12:48 ` jamal
2010-04-17 7:35 ` Eric Dumazet
2010-04-17 8:43 ` Tom Herbert
2010-04-17 9:23 ` Eric Dumazet
2010-04-17 14:27 ` Eric Dumazet
2010-04-17 17:26 ` Tom Herbert
2010-04-17 14:17 ` [PATCH net-next-2.6] net: remove time limit in process_backlog() Eric Dumazet
2010-04-18 9:36 ` David Miller
2010-04-17 17:31 ` rps perfomance WAS(Re: rps: question jamal
2010-04-18 9:39 ` Eric Dumazet
2010-04-18 11:34 ` Eric Dumazet
2010-04-19 2:09 ` jamal
2010-04-19 9:37 ` [RFC] rps: shortcut net_rps_action() Eric Dumazet
2010-04-19 9:48 ` Changli Gao
2010-04-19 12:14 ` Eric Dumazet
2010-04-19 12:28 ` Changli Gao
2010-04-19 13:27 ` Eric Dumazet
2010-04-19 14:22 ` Eric Dumazet
2010-04-19 15:07 ` [PATCH net-next-2.6] " Eric Dumazet
2010-04-19 16:02 ` Tom Herbert
2010-04-19 20:21 ` David Miller
2010-04-20 7:17 ` [PATCH net-next-2.6] rps: cleanups Eric Dumazet
2010-04-20 8:18 ` David Miller
2010-04-19 23:56 ` [PATCH net-next-2.6] rps: shortcut net_rps_action() Changli Gao
2010-04-20 0:32 ` Changli Gao
2010-04-20 5:55 ` Eric Dumazet
2010-04-20 12:02 ` rps perfomance WAS(Re: rps: question jamal
2010-04-20 13:13 ` Eric Dumazet
[not found] ` <1271853570.4032.21.camel@bigi>
2010-04-21 19:01 ` Eric Dumazet
2010-04-22 1:27 ` Changli Gao
2010-04-22 12:12 ` jamal
2010-04-25 2:31 ` Changli Gao
2010-04-26 11:35 ` jamal
2010-04-26 13:35 ` Changli Gao
2010-04-21 21:53 ` Rick Jones
2010-04-16 15:57 ` Tom Herbert
2010-04-14 18:53 ` Stephen Hemminger
2010-04-15 8:42 ` 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=1271424065.4606.31.camel@bigi \
--to=hadi@cyberus.ca \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
--cc=robert@herjulf.net \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.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).