All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: yanjun.zhu@oracle.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCHv3 1/1] forcedeth: use per cpu to collect xmit/recv statistics
Date: Fri, 06 Sep 2019 15:07:15 +0200 (CEST)	[thread overview]
Message-ID: <20190906.150715.1583606913988184408.davem@davemloft.net> (raw)
In-Reply-To: <1567674942-5132-2-git-send-email-yanjun.zhu@oracle.com>

From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Thu,  5 Sep 2019 05:15:42 -0400

> When testing with a background iperf pushing 1Gbit/sec traffic and running
> both ifconfig and netstat to collect statistics, some deadlocks occurred.
> 
> Ifconfig and netstat will call nv_get_stats64 to get software xmit/recv
> statistics. In the commit f5d827aece36 ("forcedeth: implement
> ndo_get_stats64() API"), the normal tx/rx variables is to collect tx/rx
> statistics. The fix is to replace normal tx/rx variables with per
> cpu 64-bit variable to collect xmit/recv statistics. The per cpu variable
> will avoid deadlocks and provide fast efficient statistics updates.
> 
> In nv_probe, the per cpu variable is initialized. In nv_remove, this
> per cpu variable is freed.
> 
> In xmit/recv process, this per cpu variable will be updated.
> 
> In nv_get_stats64, this per cpu variable on each cpu is added up. Then
> the driver can get xmit/recv packets statistics.
> 
> A test runs for several days with this commit, the deadlocks disappear
> and the performance is better.
> 
> Tested:
 ...
> Fixes: f5d827aece36 ("forcedeth: implement ndo_get_stats64() API")
> CC: Joe Jin <joe.jin@oracle.com>
> CC: JUNXIAO_BI <junxiao.bi@oracle.com>
> Reported-and-tested-by: Nan san <nan.1986san@gmail.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Applied.

      reply	other threads:[~2019-09-06 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  9:15 [PATCHv3 0/1] Fix deadlock problem and make performance better Zhu Yanjun
2019-09-05  9:15 ` [PATCHv3 1/1] forcedeth: use per cpu to collect xmit/recv statistics Zhu Yanjun
2019-09-06 13:07   ` David Miller [this message]

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=20190906.150715.1583606913988184408.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=yanjun.zhu@oracle.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.