* [PATCH] net: change netdev_unregister_timeout_secs min value to 1
@ 2021-03-25 10:31 Dmitry Vyukov
2021-03-25 14:34 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Vyukov @ 2021-03-25 10:31 UTC (permalink / raw)
To: edumazet, davem; +Cc: leon, Dmitry Vyukov, netdev, linux-kernel
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.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Suggested-by: Eric Dumazet <edumazet@google.com>
Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Documentation/admin-guide/sysctl/net.rst | 2 +-
net/core/sysctl_net_core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
index 2090bfc69aa50..c941b214e0b7f 100644
--- a/Documentation/admin-guide/sysctl/net.rst
+++ b/Documentation/admin-guide/sysctl/net.rst
@@ -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
----------
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index d84c8a1b280e2..c8496c1142c9d 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -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
--
2.31.0.291.g576ba9dcdaf-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: change netdev_unregister_timeout_secs min value to 1
2021-03-25 10:31 [PATCH] net: change netdev_unregister_timeout_secs min value to 1 Dmitry Vyukov
@ 2021-03-25 14:34 ` Eric Dumazet
2021-03-25 14:38 ` Dmitry Vyukov
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2021-03-25 14:34 UTC (permalink / raw)
To: Dmitry Vyukov, edumazet, davem; +Cc: leon, netdev, linux-kernel
On 3/25/21 11:31 AM, Dmitry Vyukov 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.
>
> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
Please respin your patch, and fix the merge issue [1]
For networking patches it is customary to tell if its for net or net-next tree.
[1]
diff --git a/net/core/dev.c b/net/core/dev.c
index 4bb6dcdbed8b856c03dc4af8b7fafe08984e803f..7bb00b8b86c6494c033cf57460f96ff3adebe081 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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",
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: change netdev_unregister_timeout_secs min value to 1
2021-03-25 14:34 ` Eric Dumazet
@ 2021-03-25 14:38 ` Dmitry Vyukov
2021-03-25 14:43 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Vyukov @ 2021-03-25 14:38 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Eric Dumazet, David Miller, Leon Romanovsky, netdev, LKML
On Thu, Mar 25, 2021 at 3:34 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On 3/25/21 11:31 AM, Dmitry Vyukov 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.
> >
> > Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> > Suggested-by: Eric Dumazet <edumazet@google.com>
> > Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")
> > Cc: netdev@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
>
> Please respin your patch, and fix the merge issue [1]
Is net-next rebuilt and rebased? Do I send v4 of the whole change?
I cannot base it on net-next now, because net-next already includes
most of it... so what should I use as base then?
> For networking patches it is customary to tell if its for net or net-next tree.
>
> [1]
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 4bb6dcdbed8b856c03dc4af8b7fafe08984e803f..7bb00b8b86c6494c033cf57460f96ff3adebe081 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -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",
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: change netdev_unregister_timeout_secs min value to 1
2021-03-25 14:38 ` Dmitry Vyukov
@ 2021-03-25 14:43 ` Eric Dumazet
2021-03-25 14:53 ` Dmitry Vyukov
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2021-03-25 14:43 UTC (permalink / raw)
To: Dmitry Vyukov, Eric Dumazet
Cc: Eric Dumazet, David Miller, Leon Romanovsky, netdev, LKML
On 3/25/21 3:38 PM, Dmitry Vyukov wrote:
> On Thu, Mar 25, 2021 at 3:34 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> On 3/25/21 11:31 AM, Dmitry Vyukov 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.
>>>
>>> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
>>> Suggested-by: Eric Dumazet <edumazet@google.com>
>>> Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")
>>> Cc: netdev@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org
>>> ---
>>
>> Please respin your patch, and fix the merge issue [1]
>
> Is net-next rebuilt and rebased? Do I send v4 of the whole change?
> I cannot base it on net-next now, because net-next already includes
> most of it... so what should I use as base then?
>
>> For networking patches it is customary to tell if its for net or net-next tree.
>>
>> [1]
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index 4bb6dcdbed8b856c03dc4af8b7fafe08984e803f..7bb00b8b86c6494c033cf57460f96ff3adebe081 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -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",
Please include my fix into your patch.
Send a V2, based on current net-next.
net-next is never rebased, we have to fix the bug by adding a fix on top of it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: change netdev_unregister_timeout_secs min value to 1
2021-03-25 14:43 ` Eric Dumazet
@ 2021-03-25 14:53 ` Dmitry Vyukov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Vyukov @ 2021-03-25 14:53 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Eric Dumazet, David Miller, Leon Romanovsky, netdev, LKML
On Thu, Mar 25, 2021 at 3:43 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On 3/25/21 3:38 PM, Dmitry Vyukov wrote:
> > On Thu, Mar 25, 2021 at 3:34 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >> On 3/25/21 11:31 AM, Dmitry Vyukov 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.
> >>>
> >>> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> >>> Suggested-by: Eric Dumazet <edumazet@google.com>
> >>> Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable")
> >>> Cc: netdev@vger.kernel.org
> >>> Cc: linux-kernel@vger.kernel.org
> >>> ---
> >>
> >> Please respin your patch, and fix the merge issue [1]
> >
> > Is net-next rebuilt and rebased? Do I send v4 of the whole change?
> > I cannot base it on net-next now, because net-next already includes
> > most of it... so what should I use as base then?
> >
> >> For networking patches it is customary to tell if its for net or net-next tree.
> >>
> >> [1]
> >> diff --git a/net/core/dev.c b/net/core/dev.c
> >> index 4bb6dcdbed8b856c03dc4af8b7fafe08984e803f..7bb00b8b86c6494c033cf57460f96ff3adebe081 100644
> >> --- a/net/core/dev.c
> >> +++ b/net/core/dev.c
> >> @@ -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",
>
> Please include my fix into your patch.
>
> Send a V2, based on current net-next.
>
> net-next is never rebased, we have to fix the bug by adding a fix on top of it.
Ah, got it. Mailed:
[PATCH net-next v2] net: change netdev_unregister_timeout_secs min value to 1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-25 14:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-25 10:31 [PATCH] net: change netdev_unregister_timeout_secs min value to 1 Dmitry Vyukov
2021-03-25 14:34 ` Eric Dumazet
2021-03-25 14:38 ` Dmitry Vyukov
2021-03-25 14:43 ` Eric Dumazet
2021-03-25 14:53 ` Dmitry Vyukov
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.