net: change netdev_unregister_timeout_secs min value to 1
Subsystems (3)
PATCH v2 1/1 net: change netdev_unregister_timeout_secs min value to 1
netdev_unregister_timeout_secs=0 can lead to printing the "waiting for dev to become free" message every jiffy. This is too frequent and unnecessary.
Set the min value to 1 second.
Also fix the merge issue introduced by
"net: make unregister netdev warning timeout configurable":
it changed "refcnt != 1" to "refcnt".
---
Changes since v1:
- fix merge issue related to refcnt check
--- Documentation/admin-guide/sysctl/net.rst | 2 +- net/core/dev.c | 2 +- net/core/sysctl_net_core.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Documentation/admin-guide/sysctl/net.rst +1 -1
@@ -320,7 +320,7 @@ waiting for a network device refcount to drop to 0 during device unregistration. A lower value may be useful during bisection to detect a leaked reference faster. A larger value may be useful to prevent false warnings on slow/loaded systems. -Default value is 10, minimum 0, maximum 3600. +Default value is 10, minimum 1, maximum 3600. optmem_max ----------
net/core/dev.c +1 -1
@@ -10431,7 +10431,7 @@ static void netdev_wait_allrefs(struct net_device *dev) refcnt =netdev_refcnt_read (dev); -if (refcnt && +if (refcnt !=1 &&time_after (jiffies, warning_time + netdev_unregister_timeout_secs *HZ )) { pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
net/core/sysctl_net_core.c +1 -1
@@ -577,7 +577,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = SYSCTL_ZERO, + .extra1 = SYSCTL_ONE, .extra2 = &int_3600, }, { }
base-commit: 84c7f6c33f42a12eb036ebf0f0e3670799304120
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
Quoted 9 lines · Dmitry Vyukov
netdev_unregister_timeout_secs=0 can lead to printing the "waiting for dev to become free" message every jiffy. This is too frequent and unnecessary.
Set the min value to 1 second.Also fix the merge issue introduced by
"net: make unregister netdev warning timeout configurable":
it changed "refcnt != 1" to "refcnt".
Quoted 8 lines
Signed-off-by Dmitry Vyukov <[email protected]>Suggested-by Eric Dumazet <[email protected]>Fixes 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")---
Changes since v1:
- fix merge issue related to refcnt check
Thanks !
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Thu, 25 Mar 2021 15:52:45 +0100 you wrote:
netdev_unregister_timeout_secs=0 can lead to printing the "waiting for dev to become free" message every jiffy. This is too frequent and unnecessary.
Set the min value to 1 second.Also fix the merge issue introduced by
"net: make unregister netdev warning timeout configurable":
it changed "refcnt != 1" to "refcnt".[...]
Here is the summary with links:
- [net-next,v2] net: change netdev_unregister_timeout_secs min value to 1
https://git.kernel.org/netdev/net-next/c/6c996e19949b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html