netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: reorganize IP MIB values
@ 2012-08-05  6:33 Eric Dumazet
  2012-08-06 20:41 ` David Miller
  2012-08-11 20:42 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2012-08-05  6:33 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

Reduce IP latencies by placing hot MIB IP fields in a single cache line.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/linux/snmp.h |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 00bc189..aa02b9e 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -18,7 +18,14 @@
 enum
 {
 	IPSTATS_MIB_NUM = 0,
+/* frequently written fields in fast path, kept in same cache line */
 	IPSTATS_MIB_INPKTS,			/* InReceives */
+	IPSTATS_MIB_INOCTETS,			/* InOctets */
+	IPSTATS_MIB_INDELIVERS,			/* InDelivers */
+	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */
+	IPSTATS_MIB_OUTPKTS,			/* OutRequests */
+	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */
+/* other fields */
 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */
 	IPSTATS_MIB_INTOOBIGERRORS,		/* InTooBigErrors */
 	IPSTATS_MIB_INNOROUTES,			/* InNoRoutes */
@@ -26,9 +33,6 @@ enum
 	IPSTATS_MIB_INUNKNOWNPROTOS,		/* InUnknownProtos */
 	IPSTATS_MIB_INTRUNCATEDPKTS,		/* InTruncatedPkts */
 	IPSTATS_MIB_INDISCARDS,			/* InDiscards */
-	IPSTATS_MIB_INDELIVERS,			/* InDelivers */
-	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */
-	IPSTATS_MIB_OUTPKTS,			/* OutRequests */
 	IPSTATS_MIB_OUTDISCARDS,		/* OutDiscards */
 	IPSTATS_MIB_OUTNOROUTES,		/* OutNoRoutes */
 	IPSTATS_MIB_REASMTIMEOUT,		/* ReasmTimeout */
@@ -42,8 +46,6 @@ enum
 	IPSTATS_MIB_OUTMCASTPKTS,		/* OutMcastPkts */
 	IPSTATS_MIB_INBCASTPKTS,		/* InBcastPkts */
 	IPSTATS_MIB_OUTBCASTPKTS,		/* OutBcastPkts */
-	IPSTATS_MIB_INOCTETS,			/* InOctets */
-	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */
 	IPSTATS_MIB_INMCASTOCTETS,		/* InMcastOctets */
 	IPSTATS_MIB_OUTMCASTOCTETS,		/* OutMcastOctets */
 	IPSTATS_MIB_INBCASTOCTETS,		/* InBcastOctets */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: reorganize IP MIB values
  2012-08-05  6:33 [PATCH net-next] net: reorganize IP MIB values Eric Dumazet
@ 2012-08-06 20:41 ` David Miller
  2012-08-11 20:42 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-08-06 20:41 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 05 Aug 2012 08:33:59 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> Reduce IP latencies by placing hot MIB IP fields in a single cache line.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: reorganize IP MIB values
  2012-08-05  6:33 [PATCH net-next] net: reorganize IP MIB values Eric Dumazet
  2012-08-06 20:41 ` David Miller
@ 2012-08-11 20:42 ` Stephen Hemminger
  2012-08-12  1:19   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2012-08-11 20:42 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On Sun, 05 Aug 2012 08:33:59 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> From: Eric Dumazet <edumazet@google.com>
> 
> Reduce IP latencies by placing hot MIB IP fields in a single cache line.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  include/linux/snmp.h |   12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/snmp.h b/include/linux/snmp.h
> index 00bc189..aa02b9e 100644
> --- a/include/linux/snmp.h
> +++ b/include/linux/snmp.h
> @@ -18,7 +18,14 @@
>  enum
>  {
>  	IPSTATS_MIB_NUM = 0,
> +/* frequently written fields in fast path, kept in same cache line */
>  	IPSTATS_MIB_INPKTS,			/* InReceives */
> +	IPSTATS_MIB_INOCTETS,			/* InOctets */
> +	IPSTATS_MIB_INDELIVERS,			/* InDelivers */
> +	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */
> +	IPSTATS_MIB_OUTPKTS,			/* OutRequests */
> +	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */
> +/* other fields */
>  	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */
>  	IPSTATS_MIB_INTOOBIGERRORS,		/* InTooBigErrors */
>  	IPSTATS_MIB_INNOROUTES,			/* InNoRoutes */
> @@ -26,9 +33,6 @@ enum
>  	IPSTATS_MIB_INUNKNOWNPROTOS,		/* InUnknownProtos */
>  	IPSTATS_MIB_INTRUNCATEDPKTS,		/* InTruncatedPkts */
>  	IPSTATS_MIB_INDISCARDS,			/* InDiscards */
> -	IPSTATS_MIB_INDELIVERS,			/* InDelivers */
> -	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */
> -	IPSTATS_MIB_OUTPKTS,			/* OutRequests */
>  	IPSTATS_MIB_OUTDISCARDS,		/* OutDiscards */
>  	IPSTATS_MIB_OUTNOROUTES,		/* OutNoRoutes */
>  	IPSTATS_MIB_REASMTIMEOUT,		/* ReasmTimeout */
> @@ -42,8 +46,6 @@ enum
>  	IPSTATS_MIB_OUTMCASTPKTS,		/* OutMcastPkts */
>  	IPSTATS_MIB_INBCASTPKTS,		/* InBcastPkts */
>  	IPSTATS_MIB_OUTBCASTPKTS,		/* OutBcastPkts */
> -	IPSTATS_MIB_INOCTETS,			/* InOctets */
> -	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */
>  	IPSTATS_MIB_INMCASTOCTETS,		/* InMcastOctets */
>  	IPSTATS_MIB_OUTMCASTOCTETS,		/* OutMcastOctets */
>  	IPSTATS_MIB_INBCASTOCTETS,		/* InBcastOctets */
> 
> 

Will this break kernel ABI since these are exported in sanitized headers?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: reorganize IP MIB values
  2012-08-11 20:42 ` Stephen Hemminger
@ 2012-08-12  1:19   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-08-12  1:19 UTC (permalink / raw)
  To: shemminger; +Cc: eric.dumazet, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Sat, 11 Aug 2012 13:42:19 -0700

> Will this break kernel ABI since these are exported in sanitized headers?

No, the tools parse the field names from the procfs output.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-12  1:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-05  6:33 [PATCH net-next] net: reorganize IP MIB values Eric Dumazet
2012-08-06 20:41 ` David Miller
2012-08-11 20:42 ` Stephen Hemminger
2012-08-12  1:19   ` David Miller

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).