Re: [PATCHv2 RFC] RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats

2015-09-11 Thread Raghavendra K T
On 09/11/2015 03:04 AM, Sowmini Varadhan wrote: Many commonly used functions like getifaddrs() invoke RTM_GETLINK to dump the interface information, and do not need the the AF_INET6 statististics that are always returned by default from rtnl_fill_ifinfo(). Computing the statistics can be an exp

Re: IFLA_INET6_[ICMP6]STATS

2015-09-10 Thread Raghavendra K T
On 09/10/2015 03:13 AM, David Miller wrote: From: Sowmini Varadhan Date: Wed, 9 Sep 2015 17:34:44 -0400 So the question is- who uses IFLA_INET6_STATS/IFLA_INET6_ICMP6STATS? Is this intended for some ND/ripngd etc daemon? Doesnt seem to be documented in rtnetlink(7), and couldnt find any users

Re: [PATCH] ipv4: fix 32b build

2015-08-31 Thread Raghavendra K T
On 08/31/2015 06:16 PM, Madalin Bucur wrote: Address remaining issue after 80ec192. Signed-off-by: Madalin Bucur --- net/ipv4/af_inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index c2d0ebc..96773a2 100644 --- a/net/ipv4/af_

[PATCH RFC V4 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-29 Thread Raghavendra K T
[kernel.kallsyms] [k] veth_stats_one changes/ideas suggested: Using buffer in stack (Eric), Usage of memset (David), Using memcpy in place of unaligned_put (Joe). Signed-off-by: Raghavendra K T --- net/ipv6/addrconf.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions

[PATCH RFC V4 1/2] net: Introduce helper functions to get the per cpu data

2015-08-29 Thread Raghavendra K T
Signed-off-by: Raghavendra K T --- include/net/ip.h | 10 ++ net/ipv4/af_inet.c | 41 +++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index d5fe9f2..93bf12e 100644 --- a/include/net/ip.h

[PATCH RFC V4 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-29 Thread Raghavendra K T
cache-misses: 1.41 % Please let me know if you have suggestions/comments. Thanks Eric, Joe and David for the comments. Raghavendra K T (2): net: Introduce helper functions to get the per cpu data net: Optimize snmp stat aggregation by walking all the percpu data at

Re: [PATCH RFC V3 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-29 Thread Raghavendra K T
On 08/29/2015 08:51 PM, Joe Perches wrote: On Sat, 2015-08-29 at 07:32 -0700, Eric Dumazet wrote: On Sat, 2015-08-29 at 14:37 +0530, Raghavendra K T wrote: static inline void __snmp6_fill_stats64(u64 *stats, void __percpu *mib, - int items, int bytes

[PATCH RFC V3 1/2] net: Introduce helper functions to get the per cpu data

2015-08-29 Thread Raghavendra K T
Signed-off-by: Raghavendra K T --- include/net/ip.h | 10 ++ net/ipv4/af_inet.c | 41 +++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index d5fe9f2..93bf12e 100644 --- a/include/net/ip.h

[PATCH RFC V3 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-29 Thread Raghavendra K T
[kernel.kallsyms] [k] veth_stats_one changes/ideas suggested: Using buffer in stack (Eric), Usage of memset (David), Using memcpy in place of unaligned_put (Joe). Signed-off-by: Raghavendra K T --- net/ipv6/addrconf.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) Changes

[PATCH RFC V3 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-29 Thread Raghavendra K T
.47% docker docker[.] strings.FieldsFunc cache-misses: 1.41 % Please let me know if you have suggestions/comments. Thanks Eric, Joe and David for comments on V1 and V2. Raghavendra K T (2): net: Introduc

Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-29 Thread Raghavendra K T
On 08/29/2015 10:41 AM, David Miller wrote: From: Raghavendra K T Date: Sat, 29 Aug 2015 08:27:15 +0530 resending the patch with memset. Please let me know if you want to resend all the patches. Do not post patches as replies to existing discussion threads. Instead, make a new, fresh

Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-29 Thread Raghavendra K T
On 08/29/2015 08:56 AM, Eric Dumazet wrote: On Sat, 2015-08-29 at 08:27 +0530, Raghavendra K T wrote: /* Use put_unaligned() because stats may not be aligned for u64. */ put_unaligned(items, &stats[0]); for (i = 1; i < items; i++) - put_un

Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-28 Thread Raghavendra K T
* David Miller [2015-08-28 11:24:13]: > From: Raghavendra K T > Date: Fri, 28 Aug 2015 12:09:52 +0530 > > > On 08/28/2015 12:08 AM, David Miller wrote: > >> From: Raghavendra K T > >> Date: Wed, 26 Aug 2015 23:07:33 +0530 > >> > &

Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-27 Thread Raghavendra K T
On 08/28/2015 12:08 AM, David Miller wrote: From: Raghavendra K T Date: Wed, 26 Aug 2015 23:07:33 +0530 @@ -4641,10 +4647,12 @@ static inline void __snmp6_fill_stats64(u64 *stats, void __percpu *mib, static void snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype

[PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-26 Thread Raghavendra K T
[kernel.kallsyms] [k] _raw_spin_lock Signed-off-by: Raghavendra K T --- net/ipv6/addrconf.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) Change in V2: - Allocate stat calculation buffer in stack (Eric) Thanks David and Eric for coments on V1 and as both of them

[PATCH RFC V2 1/2] net: Introduce helper functions to get the per cpu data

2015-08-26 Thread Raghavendra K T
Signed-off-by: Raghavendra K T --- include/net/ip.h | 10 ++ net/ipv4/af_inet.c | 41 +++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index d5fe9f2..93bf12e 100644 --- a/include/net/ip.h

[PATCH RFC V2 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-26 Thread Raghavendra K T
lease let me know if you have suggestions/comments. Thanks Eric and David for comments on V1. Raghavendra K T (2): net: Introduce helper functions to get the per cpu data net: Optimize snmp stat aggregation by walking all the percpu data at once include/net/ip.h| 10 +++

Re: [PATCH RFC 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-26 Thread Raghavendra K T
On 08/26/2015 07:39 PM, Eric Dumazet wrote: On Wed, 2015-08-26 at 15:55 +0530, Raghavendra K T wrote: On 08/26/2015 04:37 AM, David Miller wrote: From: Raghavendra K T Date: Tue, 25 Aug 2015 13:24:24 +0530 Please let me know if you have suggestions/comments. Like Eric Dumazet said the

Re: [PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-26 Thread Raghavendra K T
On 08/25/2015 09:30 PM, Eric Dumazet wrote: On Tue, 2015-08-25 at 21:17 +0530, Raghavendra K T wrote: On 08/25/2015 07:58 PM, Eric Dumazet wrote: This is a great idea, but kcalloc()/kmalloc() can fail and you'll crash the whole kernel at this point. Good catch, and my bad. Though s

Re: [PATCH RFC 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-26 Thread Raghavendra K T
On 08/26/2015 04:37 AM, David Miller wrote: From: Raghavendra K T Date: Tue, 25 Aug 2015 13:24:24 +0530 Please let me know if you have suggestions/comments. Like Eric Dumazet said the idea is good but needs some adjustments. You might want to see whether a per-cpu work buffer works for

Re: [PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-25 Thread Raghavendra K T
On 08/25/2015 09:30 PM, Eric Dumazet wrote: On Tue, 2015-08-25 at 21:17 +0530, Raghavendra K T wrote: On 08/25/2015 07:58 PM, Eric Dumazet wrote: This is a great idea, but kcalloc()/kmalloc() can fail and you'll crash the whole kernel at this point. Good catch, and my bad. Though s

Re: [PATCH RFC 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-25 Thread Raghavendra K T
On 08/25/2015 08:03 PM, Eric Dumazet wrote: On Tue, 2015-08-25 at 13:24 +0530, Raghavendra K T wrote: While creating 1000 containers, perf is showing lot of time spent in snmp_fold_field on a large cpu system. The current patch tries to improve by reordering the statistics gathering. Please

Re: [PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-25 Thread Raghavendra K T
On 08/25/2015 07:58 PM, Eric Dumazet wrote: On Tue, 2015-08-25 at 13:24 +0530, Raghavendra K T wrote: Docker container creation linearly increased from around 1.6 sec to 7.5 sec (at 1000 containers) and perf data showed 50% ovehead in snmp_fold_field. reason: currently __snmp6_fill_stats64

[PATCH RFC 0/2] Optimize the snmp stat aggregation for large cpus

2015-08-25 Thread Raghavendra K T
[.] strings.FieldsFunc 2.96% docker docker[.] backtrace_qsort cache-misses: 1.38 % Please let me know if you have suggestions/comments. Raghavendra K T (2): net:

[PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once

2015-08-25 Thread Raghavendra K T
[kernel.kallsyms] [k] _raw_spin_lock Signed-off-by: Raghavendra K T --- net/ipv6/addrconf.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 21c2c81..2ec905f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c

[PATCH RFC 1/2] net: Introduce helper functions to get the per cpu data

2015-08-25 Thread Raghavendra K T
Signed-off-by: Raghavendra K T --- include/net/ip.h | 10 ++ net/ipv4/af_inet.c | 41 +++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index d5fe9f2..93bf12e 100644 --- a/include/net/ip.h