Thread (23 messages) 23 messages, 4 authors, 2015-08-29

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

From: David Miller <davem@davemloft.net>
Date: 2015-08-27 18:38:26
Also in: lkml

From: Raghavendra K T <redacted>
Date: Wed, 26 Aug 2015 23:07:33 +0530
quoted hunk ↗ jump to hunk
@@ -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,
 			     int bytes)
 {
+	u64 buff[IPSTATS_MIB_MAX] = {0,};
+
 	switch (attrtype) {
 	case IFLA_INET6_STATS:
-		__snmp6_fill_stats64(stats, idev->stats.ipv6,
I would suggest using an explicit memset() here, it makes the overhead incurred
by this scheme clearer.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help