linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David <david@davidv.dev>
To: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	"David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Xiongwei Song <xiongwei.song@windriver.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:NETWORKING [IPv4/IPv6]" <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] net: make driver settling time configurable
Date: Sat, 10 Feb 2024 00:15:42 +0100	[thread overview]
Message-ID: <ee37f457-3d2d-4c18-b22f-dfb315b3c078@davidv.dev> (raw)
In-Reply-To: <7485f0b2-93fe-4c82-95e8-5b0e10f9fa7a@lunn.ch>


On 2/9/24 23:11, Andrew Lunn wrote:
> On Fri, Feb 09, 2024 at 01:59:44PM -0800, Jakub Kicinski wrote:
>> On Thu,  8 Feb 2024 10:52:29 +0100 David Ventura wrote:
>>> During IP auto configuration, some drivers apparently need to wait a
>>> certain length of time to settle; as this is not true for all drivers,
>>> make this length of time configurable.
>> Please CC folks who gave you feedback, Andrew's is missing.
Thanks for the feedback, still learning this workflow
>>
>> Andrew, what do you think about just removing the wait?
>> Or decreasing it to 1ms?
>> It feels a little wasteful to be adding uAPI for something
>> which as you said is likely papering over ancient bugs. We'll
>> fix the bugs which are still around and the uAPI will stay
>> forever :(
> My guess is, the broken drivers are doing setup stuff after they call
> netdev_register().
>
> Reducing it to 1ms will probably continue to hide such bugs. So we
> could just go with that, and probably not see any regressions. Or we
> can decide we really do want to know about broken drivers, and just
> remove the delay.
>
> Either way, we don't need a new uAPI.

Would it make sense to move this to a build-time configuration flag?

I do not have a gut-feeling for which behaviors should be configurable

at build vs run time.

> David, is 1ms too long for you? If we do take the delay out, you are
> going to receive some of the flack from regression reports.

I've used this patch to experiment with different values, and the sleep time

behaves as described in Documentation/timers/timers-howto.rst, that is, a

call of `msleep(1)` usually delays boot time by 12~13 ms in my tests.

On top of this, I'm running this specific example on a no-smp systemm, 
where I

do not believe the `msleep` achieves anything (but I'm a kernel newbie 
so please

correct me if I'm wrong).

>
>        Andrew
>

  reply	other threads:[~2024-02-09 23:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  9:35 [PATCH v2 0/2] net: ipconfig: remove wait for drivers David Ventura
2024-02-08  9:52 ` [PATCH v2 1/2] net: make driver settling time configurable David Ventura
2024-02-08 10:26   ` Denis Kirjanov
2024-02-08 16:42     ` David
2024-02-09 21:59   ` Jakub Kicinski
2024-02-09 22:11     ` Andrew Lunn
2024-02-09 23:15       ` David [this message]
2024-02-14 17:47         ` Andrew Lunn
2024-02-08 10:03 ` [PATCH v2 2/2] net: Change default delay on IP autoconfig to 0ms David Ventura
2024-02-08 10:26 ` [PATCH v2 0/2] net: ipconfig: remove wait for drivers Denis Kirjanov
2024-02-09 21:55 ` 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=ee37f457-3d2d-4c18-b22f-dfb315b3c078@davidv.dev \
    --to=david@davidv.dev \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=xiongwei.song@windriver.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).