diff mbox

[3/7] net,s390: provide architecture specific NET_SKB_PAD

Message ID 20110201081723.562745244@de.ibm.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

frank.blaschka@de.ibm.com Feb. 1, 2011, 8:16 a.m. UTC
From: Horst Hartmann <horsth@linux.vnet.ibm.com>

NET_SKB_PAD has been increased from 32 to 64 and later to max(32, L1_CACHE_BYTES). 
This led to a 25% throughput decrease for streaming workloads accompanied by a                                                               
37% CPU cost increase on s390.
In order to fix this provide an architecture specific NET_SKB_PAD config symbol.

Signed-off-by: Horst Hartmann <horsth@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---


 arch/s390/Kconfig      |    4 ++++
 include/linux/skbuff.h |    4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 1, 2011, 10:17 p.m. UTC | #1
From: frank.blaschka@de.ibm.com
Date: Tue, 01 Feb 2011 09:16:50 +0100

> From: Horst Hartmann <horsth@linux.vnet.ibm.com>
> 
> NET_SKB_PAD has been increased from 32 to 64 and later to max(32, L1_CACHE_BYTES). 
> This led to a 25% throughput decrease for streaming workloads accompanied by a                                                               
> 37% CPU cost increase on s390.
> In order to fix this provide an architecture specific NET_SKB_PAD config symbol.
> 
> Signed-off-by: Horst Hartmann <horsth@linux.vnet.ibm.com>
> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>

Define it in your arch specific header file like it is designed to
be overridden.

Also, even if this Kconfig thing was the right thing to do, you would
need to put a default for it generically in init/Kconfig or
lib/Kconfig or similar.  As this is where the central documentation
for the knob would be placed.

Lastly, you failed in your commit message to describe why you wanted
to use this whacky Kconfig mechanism to override instead of using
a straight CPP define in the s390 headers.

You're modifying generic code, so you better explain what you're doing
and exactly why.

I'm not applying this series until you fix up this change, resubmit
the entire series when you have this stuff fixed up.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -49,6 +49,10 @@  config NO_DMA
 config ARCH_DMA_ADDR_T_64BIT
 	def_bool 64BIT
 
+config NET_SKB_PAD
+	int
+	default "32"
+
 config GENERIC_LOCKBREAK
 	def_bool y if SMP && PREEMPT
 
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1431,8 +1431,10 @@  static inline int pskb_network_may_pull(
  * get_rps_cpus() for example only access one 64 bytes aligned block :
  * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
  */
-#ifndef NET_SKB_PAD
+#ifndef CONFIG_NET_SKB_PAD
 #define NET_SKB_PAD	max(32, L1_CACHE_BYTES)
+#else
+#define NET_SKB_PAD	CONFIG_NET_SKB_PAD
 #endif
 
 extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);