Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752946AbbH1SYQ (ORCPT ); Fri, 28 Aug 2015 14:24:16 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:54847 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbbH1SYP (ORCPT ); Fri, 28 Aug 2015 14:24:15 -0400 Date: Fri, 28 Aug 2015 11:24:13 -0700 (PDT) Message-Id: <20150828.112413.424099339331017970.davem@davemloft.net> To: raghavendra.kt@linux.vnet.ibm.com Cc: edumazet@google.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, jiri@resnulli.us, hannes@stressinduktion.org, tom@herbertland.com, azhou@nicira.com, ebiederm@xmission.com, ipm@chirality.org.uk, nicolas.dichtel@6wind.com, serge.hallyn@canonical.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, anton@au1.ibm.com, nacc@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com Subject: Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once From: David Miller In-Reply-To: <55E00238.10909@linux.vnet.ibm.com> References: <1440610653-14210-3-git-send-email-raghavendra.kt@linux.vnet.ibm.com> <20150827.113823.214019265460582055.davem@davemloft.net> <55E00238.10909@linux.vnet.ibm.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 28 Aug 2015 11:24:14 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1140 Lines: 30 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 >> >>> @@ -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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/