Re: [PATCH 1/2] net: Allow no-cache copy from user on transmit

Stephen Hemminger
2011-03-09T06:12:56Z

On Tue, 8 Mar 2011 21:05:06 -0800 (PST)
Tom Herbert <therbert@google.com> wrote:

> This patch uses __copy_from_user_nocache (from skb_copy_to_page)
> on transmit to bypass data cache for a performance improvement.
> This functionality is configurable per device using ethtool, the
> device must also be doing TX csum offload to enable. It seems
> reasonable to set this when the device does not copy or
> otherwise touch the data.
>
> This patch was tested using 200 instances of netperf TCP_RR with
> 1400 byte request and one byte reply. Platform is 16 core AMD.
>
> No-cache copy disabled:
> 672703 tps, 97.13% client utilization
> 50/90/99% latency 244.31 484.205 1028.41
>
> No-cache copy enabled:
> 702113 tps, 96.16% client utilization,
> 50/90/99% latency 238.56 467.56 956.955
>
> This seems to provide a nice little performance improvement and is
> consistent in the tests I ran. Presumably, this would provide
> the greatest benfits in the presence of an application workload
> stressing the cache and a lot of transmit data happening. I don't
> yet see a downside to using this.
>
> Signed-off-by: Tom Herbert <therbert@google.com>

Since this is not an ethernet only optimization or device
specific, I would prefer it be a property of device not
something in ethtool.