All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
To: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [PATCH] mlx4: give precise rx/tx bytes/packets counters
Date: Mon, 28 Nov 2016 23:55:25 +0200	[thread overview]
Message-ID: <CALzJLG8qjz7Qx8rWbthtJ1uJt2c8w_1gMeRkmB+SZ+xv2Eu3EQ@mail.gmail.com> (raw)
In-Reply-To: <20161128.154057.1355209532933900181.davem@davemloft.net>

On Mon, Nov 28, 2016 at 10:40 PM, David Miller <davem@davemloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Sat, 26 Nov 2016 18:16:00 -0800
>
>> On Sun, 2016-11-27 at 00:47 +0200, Saeed Mahameed wrote:
>>> On Fri, Nov 25, 2016 at 5:46 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>
>>> As you see here in SRIOV mode (PF only) reads   sw stats from FW.
>>> Tariq, I think we need to fix this.
>>
>> Sure, my patch does not change this at all.
>>
>> If mlx4_is_master() is false, then we aggregate the software states and
>> only the software stats.
>>
>> My patch makes this aggregation possible at the time ethtool or
>> ndo_get_stat64() are called, since this absolutely not depend on the 250
>> ms timer fetching hardware stats.
>
> Saeed please provide counter arguments or ACK this patch, thank you.

I have nothing against this patch, I just wanted to point out that
this patch is just fixing the symptom.
We keep ignoring the root cause that dev_get_stats is called under a
spin_lock which really ties our hands "us device drivers developers"
and push us towards those fragile solutions like deferred work for
caching statistics.
I am not saying that Eric should fix this in his patch, i just wanted
to raise the awareness of the root cause.

Regarding the SRIOV PF stats, i will take it with Tariq internally.

Bottom line, I ACK this patch, I might even do the same myself for
mlx5 :), but there are some follow ups that need to be done.

  reply	other threads:[~2016-11-28 21:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 15:46 [PATCH] mlx4: give precise rx/tx bytes/packets counters Eric Dumazet
2016-11-25 16:03 ` David Laight
2016-11-25 16:16   ` Eric Dumazet
2016-11-25 16:30     ` Aw: " Lino Sanfilippo
2016-11-25 19:19       ` Eric Dumazet
2016-11-28 22:02         ` Lino Sanfilippo
2016-11-29  0:19           ` Eric Dumazet
2016-11-30 15:28             ` David Laight
2016-11-30 15:47               ` Eric Dumazet
2016-11-26 22:47 ` Saeed Mahameed
2016-11-27  2:16   ` Eric Dumazet
2016-11-28 20:40     ` David Miller
2016-11-28 21:55       ` Saeed Mahameed [this message]
2016-11-28 22:57         ` Eric Dumazet
2016-11-29 18:37 ` David Miller
2016-11-30 14:08 ` Regression: " Jesper Dangaard Brouer
2016-11-30 15:58   ` Eric Dumazet
2016-11-30 16:46     ` Saeed Mahameed
2016-11-30 17:35       ` Eric Dumazet
2016-11-30 20:42         ` Saeed Mahameed
2016-11-30 21:00           ` Eric Dumazet
2016-12-01 12:37             ` Jesper Dangaard Brouer
2016-12-01 13:02               ` [PATCH net-next] mlx4: fix use-after-free in mlx4_en_fold_software_stats() Eric Dumazet
2016-12-01 15:23                 ` Saeed Mahameed
2016-12-02 18:36                 ` David Miller
2016-12-01 15:38             ` Regression: [PATCH] mlx4: give precise rx/tx bytes/packets counters Saeed Mahameed
2016-12-01 15:55               ` Eric Dumazet
2016-12-01 16:08                 ` Eric Dumazet
2016-12-01 17:36                   ` Eric Dumazet
2016-12-04 13:23                     ` Saeed Mahameed
2016-12-01 16:33                 ` Saeed Mahameed
2016-12-01 17:08                   ` Eric Dumazet
2016-12-04 13:21                     ` Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALzJLG8qjz7Qx8rWbthtJ1uJt2c8w_1gMeRkmB+SZ+xv2Eu3EQ@mail.gmail.com \
    --to=saeedm@dev.mellanox.co.il \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.