[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1272547307.2222.83.camel@edumazet-laptop>
Date: Thu, 29 Apr 2010 15:21:47 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: hadi@...erus.ca
Cc: Changli Gao <xiaosuo@...il.com>,
David Miller <davem@...emloft.net>, therbert@...gle.com,
shemminger@...tta.com, netdev@...r.kernel.org,
Eilon Greenstein <eilong@...adcom.com>,
Brian Bloniarz <bmb@...enacr.com>
Subject: Re: [PATCH net-next-2.6] net: speedup udp receive path
Le jeudi 29 avril 2010 à 09:17 -0400, jamal a écrit :
> Could we have some stat in there that shows IPIs being produced? I think
> it would help to at least observe any changes over variety of tests.
> I did try to patch my system during the first few tests to record IPIs
> but it seems to make more sense to have it as a perf stat.
>
> > Even with 200.000 IPI per second, 'perf top -C CPU_IPI_sender' shows
> > that sending IPI is very cheap (maybe ~1% of cpu cycles)
> >
> > # Samples: 32033467127
> > #
>
> One thing i observed is our profiles seem different. Could you send me
> your .config for a single nehalem and i will try to go as close as
> possible to it? I have a sky2 instead of bnx - but i suspect everything
> else will be very similar...
> I apologize i dont have much time to look into details - but what i can
> do is test at least.
I'am going to redo some test on my 'old machine', with tg3 driver.
You could try following program :
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
struct softnet_stat_vals {
int flip;
unsigned int tab[2][10];
};
int read_file(struct softnet_stat_vals *v)
{
char buffer[1024];
FILE *F = fopen("/proc/net/softnet_stat", "r");
v->flip ^= 1;
if (!F)
return -1;
memset(v->tab[v->flip], 0, 10 * sizeof(unsigned int));
while (fgets(buffer, sizeof(buffer), F)) {
int i, pos = 0;
unsigned int val;
for (i = 0; ;) {
if (sscanf(buffer + pos, "%08x", &val) != 1) break;
v->tab[v->flip][i] += val;
pos += 9;
if (++i == 10)
break;
}
}
fclose(F);
}
int main(int argc, char *argv[])
{
struct softnet_stat_vals *v = calloc(sizeof(struct softnet_stat_vals), 1);
read_file(v);
for (;;) {
sleep(1);
read_file(v);
printf("%u rps\n", v->tab[v->flip][9] - v->tab[v->flip^1][9]);
}
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists