netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Matthew Wilcox <willy@infradead.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 9/9] u64_stat: Remove the obsolete fetch_irq() variants
Date: Mon, 22 Aug 2022 11:05:43 -0700	[thread overview]
Message-ID: <20220822110543.4f1a8962@kernel.org> (raw)
In-Reply-To: <YwOd7Ex7W21WzQ8N@linutronix.de>

On Mon, 22 Aug 2022 17:17:00 +0200 Sebastian Andrzej Siewior wrote:
> Using u64_stats_fetch_begin() is most likely wrong in networking because
> the stats are updated while packets are received which is either in IRQ
> or in BH (except maybe for the SPI/I2C ethernet driver). The _bh()
> version was replaced with _irq() for netpoll reasons.
> u64_stats_fetch_begin() does not disable any of those two (IRQ, BH) on
> 32bit-UP and does not use a seqcount so it is possible that an update
> happens during the read out of stats. Let me look…
> 	drivers/net/ethernet/cortina/gemini.c
> reads in net_device_ops::ndo_get_stats64(), updates in NAPI.
> 
> 	drivers/net/ethernet/huawei/hinic/hinic_rx.c
> reads in net_device_ops::ndo_get_stats64() and
> ethtool_ops::get_ethtool_stats(), updates in NAPI. Good.
> 
> So I guess these want be fixed properly instead of silently via the
> series?

Guess so, but it shouldn't be extra work if we're delaying the driver
conversion till 6.1?

  reply	other threads:[~2022-08-22 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220817162703.728679-1-bigeasy@linutronix.de>
2022-08-17 16:27 ` [PATCH 8/9] u64_stats: Streamline the implementation Sebastian Andrzej Siewior
2022-08-17 16:27 ` [PATCH 9/9] u64_stat: Remove the obsolete fetch_irq() variants Sebastian Andrzej Siewior
2022-08-17 18:27   ` Jakub Kicinski
2022-08-18 15:27     ` Sebastian Andrzej Siewior
2022-08-18 16:02       ` Jakub Kicinski
2022-08-18 16:59         ` Sebastian Andrzej Siewior
2022-08-18 17:45           ` Jakub Kicinski
2022-08-22 15:17             ` Sebastian Andrzej Siewior
2022-08-22 18:05               ` Jakub Kicinski [this message]
2022-08-25 16:45                 ` Sebastian Andrzej Siewior
2022-08-25 17:30                   ` Jakub Kicinski

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=20220822110543.4f1a8962@kernel.org \
    --to=kuba@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).