netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	netdev@vger.kernel.org
Cc: Marc MERLIN <marc@merlins.org>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [RFC PATCH] net: ethtool: do runtime PM outside RTNL
Date: Wed, 6 Dec 2023 12:59:09 +0100	[thread overview]
Message-ID: <64684afc-3dbb-453e-9c90-bf2a86e70c50@gmail.com> (raw)
In-Reply-To: <c1189a1982630f71dd106c3963e0fa71fa6c8a76.camel@sipsolutions.net>

On 06.12.2023 10:37, Johannes Berg wrote:
> On Wed, 2023-12-06 at 09:46 +0100, Przemek Kitszel wrote:
>>
>> That sounds right too; one could argue if your fix is orthogonal to that
>> or not. I would say that your fix makes core net code more robust
>> against drivers from past millennia. :)
>> igc folks are notified, no idea how much time it would take to propose
>> a fix.
> 
> Maybe it should be on whoever added runtime pm to ethtool ;-)
> 
> Heiner, the igc driver was already doing this when you added
> pm_runtime_get_sync() ops, was there a discussion at the time, or just
> missed?
> 
I think it went unnoticed at that time that igc is acquiring RTNL
in runtime-resume. I'm just astonished that this pops up only now,
considering that the change was done more than 2 yrs ago.

Note: In __dev_open() there's a similar scenario where the
runtime-resume callback may be executed under RTNL.

> I really don't know any of this ...
> 
>>> Well, according to the checks, the patch really should use
>>> netdev_get_by_name() and netdev_put()? But I don't know how to do that
>>> on short-term stack thing ... maybe it doesn't have to?
>>
>> Nice to have such checks :)
>> You need some &netdevice_tracker, perhaps one added into struct net
>> or other place that would allow to track it at ethtool level.
> 
> Yeah but that's dynamic? Seems weird to add something to allocations for
> something released in the same function ...
> 
>> "short term stack thing" does not relieve us from good coding practices,
>> but perhaps "you just replaced __dev_get_by_name() call by
>> dev_get_by_name()" to fix a bug would ;) - with transition to tracked
>> alloc as a next series to be promised :)
> 
> All I want is to know how ;)
> but I guess I can try to find examples.
> 
>> anyway, I'm fresh here, and would love to know what others think about
> 
> Not me, but me too ;-)
> 
> johannes


  reply	other threads:[~2023-12-06 11:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 19:07 [RFC PATCH] net: ethtool: do runtime PM outside RTNL Johannes Berg
     [not found] ` <20231204200038.GA9330@merlins.org>
     [not found]   ` <a6ac887f7ce8af0235558752d0c781b817f1795a.camel@sipsolutions.net>
2023-12-04 20:36     ` Marc MERLIN
2023-12-04 20:40       ` Johannes Berg
2023-12-04 20:54         ` Marc MERLIN
2023-12-04 21:28           ` Marc MERLIN
2023-12-04 21:32             ` Johannes Berg
2023-12-04 22:22               ` Jakub Kicinski
2023-12-04 22:25                 ` Johannes Berg
2023-12-05  2:46             ` Marc MERLIN
2023-12-05 19:33               ` Johannes Berg
2023-12-05 23:15                 ` Marc MERLIN
2023-12-06  9:50                   ` Johannes Berg
2023-12-05  5:19 ` Przemek Kitszel
2023-12-05 19:48   ` Johannes Berg
2023-12-06  8:46     ` Przemek Kitszel
2023-12-06  9:37       ` Johannes Berg
2023-12-06 11:59         ` Heiner Kallweit [this message]
2024-01-03  8:20           ` Stanislaw Gruszka

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=64684afc-3dbb-453e-9c90-bf2a86e70c50@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=marc@merlins.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.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 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).