[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150828.112413.424099339331017970.davem@davemloft.net>
Date: Fri, 28 Aug 2015 11:24:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: raghavendra.kt@...ux.vnet.ibm.com
Cc: edumazet@...gle.com, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, kaber@...sh.net, jiri@...nulli.us,
hannes@...essinduktion.org, tom@...bertland.com, azhou@...ira.com,
ebiederm@...ssion.com, ipm@...rality.org.uk,
nicolas.dichtel@...nd.com, serge.hallyn@...onical.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
anton@....ibm.com, nacc@...ux.vnet.ibm.com,
srikar@...ux.vnet.ibm.com
Subject: Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by
walking all the percpu data at once
From: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
Date: Fri, 28 Aug 2015 12:09:52 +0530
> On 08/28/2015 12:08 AM, David Miller wrote:
>> From: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
>> 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,
>>> int bytes)
>>> {
>>> + u64 buff[IPSTATS_MIB_MAX] = {0,};
>>> +
...
> hope you wanted to know the overhead than to change the current
> patch. please let me know..
I want you to change that variable initializer to an explicit memset().
The compiler is emitting a memset() or similar _anyways_.
Not because it will have any impact at all upon performance, but because
of how it looks to people trying to read and understand the code.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists