From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757214AbcH3IPg (ORCPT ); Tue, 30 Aug 2016 04:15:36 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:34045 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756689AbcH3IPd (ORCPT ); Tue, 30 Aug 2016 04:15:33 -0400 Subject: Re: [RFC PATCH 1/6] proc: Reduce cache miss in {snmp,netstat}_seq_show To: Eric Dumazet References: <1472486640-1111-1-git-send-email-hejianet@gmail.com> <1472486640-1111-2-git-send-email-hejianet@gmail.com> <1472488885.14381.260.camel@edumazet-glaptop3.roam.corp.google.com> 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 From: hejianet Message-ID: <0c4f4f45-ec27-d1d3-45f8-a7ed8a4ca667@gmail.com> Date: Tue, 30 Aug 2016 16:15:36 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472488885.14381.260.camel@edumazet-glaptop3.roam.corp.google.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric On 8/30/16 12:41 AM, Eric Dumazet wrote: > On Tue, 2016-08-30 at 00:03 +0800, Jia He wrote: >> This patch exchanges the two loop for collecting the percpu statistics >> data. This can aggregate the data by going through all the items of each >> cpu sequentially. In snmp_seq_show, just use one buff copy to dislay the >> Udp and UdpLite data because they are the same. > This is obviously not true. > > On my laptop it seems it handled no UdpLite frames, but got plenty of > Udp ones. > > $ grep Udp /proc/net/snmp > Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors > Udp: 1555889 108318 0 3740780 0 0 0 > UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors > UdpLite: 0 0 0 0 0 0 0 Thanks, you are right. I misunderstand the comments of source codes. Will resend it B.R. Jia > > > > . >