lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 20 Jul 2017 22:59:17 +0100
From:   kiki good <jqiaoulk@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net: systemport: Support 64bit statistics

Hi Stephen:

Thanks for the suggestion of using per-cpu statistics. In this part of
code, there are two major reasons
not to use per-cpu variable for calculating Tx packets:

1. The update of ring->bytes and ring ->packets are protected with irq
version's spin lock in the current code logic. Although BH
     is disabled and it is safe to use per-cpu variable, i don't see
much more benefit of using it if it is still under irq version's spin
lock protection.

2. This driver requires update each ring's bytes and packets; The
number of rings are decided dynamically. so in order to use per-cpu
     variable, we need to track allocation and free every time when
the sizes of rings change that might have some performance concerns.

For Rx packets, using per-cpu variable is possible.

Thanks
Jmqiao

On Thu, Jul 20, 2017 at 4:44 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Wed, 19 Jul 2017 01:18:40 +0100
> "Jianming.qiao" <jqiaoulk@...il.com> wrote:
>
>> Signed-off-by: Jianming.qiao <kiki-good@...mail.com>
>
> You may want to consider using per-cpu statistics.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ