From: Eric Dumazet <eric.dumazet@gmail.com>
To: Deng-Cheng Zhu <dczhu@mips.com>
Cc: davem@davemloft.net, therbert@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH] RPS: Sparse connection optimizations
Date: Sat, 28 Apr 2012 13:55:56 +0200 [thread overview]
Message-ID: <1335614156.2900.66.camel@edumazet-glaptop> (raw)
In-Reply-To: <1335607805-735-1-git-send-email-dczhu@mips.com>
On Sat, 2012-04-28 at 18:10 +0800, Deng-Cheng Zhu wrote:
> From: Deng-Cheng Zhu <dczhu@mips.com>
>
> Currently, choosing target CPU to process the incoming packet is based on
> skb->rxhash. In the case of sparse connections, this could lead to
> relatively low and inconsistent bandwidth while doing network throughput
> tests -- CPU selection in the RPS map is imbalanced. Even with the same
> hash value, 2 packets could come from different devices. Besides, on
> architectures like MIPS with multi-threaded cores, siblings of CPU0 should
> not be selected when others are not saturated.
What CPU0 is doing so special you have to mention it in this changelog ?
>
> This patch introduces a feature that allows some flows to select their CPUs
> by looping the RPS CPU maps. Some tests were performed on the MIPS Malta
> 1004K platform (2 cores, each with 2 VPEs) at 25Mhz with 2 Intel Pro/1000
> NICs. The Malta board works as a router between 2 PCs. Using iperf, here
> are results:
RPS on a router ? Thats not very good, unless you perform a crazy amount
of work in iptables rules maybe ?
One packet comes, its better to handle it right now and send it right
now on the same cpu. No IPI cost, no cache line misses...
RPS is something more suitable to TCP handling in local host because
stack has big memory footprint and latencies, not for forwarding
workload.
I suspect you can reach more throughput using appropriate tunings
(correct interrupt affinities). This sounds like a bad config from the
very beginning.
> +};
> +
> +static struct cpu_flow flow[CONFIG_NR_RPS_MAP_LOOPS][NR_CPUS];
Thats absolutely not allowed to add a [NR_CPUS] array anywhere in linux
kernel in 2012.
> +/*
> + * We've got CONFIG_SMP to do RPS, so only arch define is needed here to access
> + * sibling specific information.
> + */
> +#if defined(CONFIG_MIPS)
Thats not allowed to add a CONFIG_somearch in net/core/dev.c
next prev parent reply other threads:[~2012-04-28 11:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 10:10 [PATCH] RPS: Sparse connection optimizations Deng-Cheng Zhu
2012-04-28 11:55 ` Eric Dumazet [this message]
2012-05-02 4:08 ` Deng-Cheng Zhu
2012-05-02 4:12 ` Eric Dumazet
2012-05-02 4:16 ` Deng-Cheng Zhu
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=1335614156.2900.66.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dczhu@mips.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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