From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934255AbcIFMoa (ORCPT ); Tue, 6 Sep 2016 08:44:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47198 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933782AbcIFMo2 (ORCPT ); Tue, 6 Sep 2016 08:44:28 -0400 Date: Tue, 6 Sep 2016 09:44:13 -0300 From: Marcelo Ricardo Leitner To: Jia He Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Vlad Yasevich , Neil Horman , Steffen Klassert , Herbert Xu Subject: Re: [RFC PATCH v2 0/6] Reduce cache miss for snmp_fold_field Message-ID: <20160906124413.GC27658@localhost.localdomain> References: <1473129009-20478-1-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473129009-20478-1-git-send-email-hejianet@gmail.com> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 06 Sep 2016 12:44:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2016 at 10:30:03AM +0800, Jia He wrote: ... > v2: > - 1/6 fix bug in udplite statistics. > - 1/6 snmp_seq_show is split into 2 parts > > Jia He (6): > proc: Reduce cache miss in {snmp,netstat}_seq_show > proc: Reduce cache miss in snmp6_seq_show > proc: Reduce cache miss in sctp_snmp_seq_show > proc: Reduce cache miss in xfrm_statistics_seq_show > ipv6: Remove useless parameter in __snmp6_fill_statsdev > net: Suppress the "Comparison to NULL could be written" warning Hi Jia, Did you try to come up with a generic interface for this, like snmp_fold_fields64() (note the fieldS) or snmp_fold_field64_batch() ? Sounds like we have the same code in several places and seems they all operate very similarly. They have a percpu table, an identified max, a destination buffer.. If this is possible, this would reduce the possibility of hiccups in a particular code. Marcelo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Date: Tue, 06 Sep 2016 12:44:13 +0000 Subject: Re: [RFC PATCH v2 0/6] Reduce cache miss for snmp_fold_field Message-Id: <20160906124413.GC27658@localhost.localdomain> List-Id: References: <1473129009-20478-1-git-send-email-hejianet@gmail.com> In-Reply-To: <1473129009-20478-1-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jia He Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Vlad Yasevich , Neil Horman , Steffen Klassert , Herbert Xu On Tue, Sep 06, 2016 at 10:30:03AM +0800, Jia He wrote: ... > v2: > - 1/6 fix bug in udplite statistics. > - 1/6 snmp_seq_show is split into 2 parts > > Jia He (6): > proc: Reduce cache miss in {snmp,netstat}_seq_show > proc: Reduce cache miss in snmp6_seq_show > proc: Reduce cache miss in sctp_snmp_seq_show > proc: Reduce cache miss in xfrm_statistics_seq_show > ipv6: Remove useless parameter in __snmp6_fill_statsdev > net: Suppress the "Comparison to NULL could be written" warning Hi Jia, Did you try to come up with a generic interface for this, like snmp_fold_fields64() (note the fieldS) or snmp_fold_field64_batch() ? Sounds like we have the same code in several places and seems they all operate very similarly. They have a percpu table, an identified max, a destination buffer.. If this is possible, this would reduce the possibility of hiccups in a particular code. Marcelo