lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: core: explicitly call linkwatch_fire_event to speed up the startup of network services
From
From: Wen Yang <wenyang@linux.alibaba.com>
Date: Sat, 1 Aug 2020 16:58:45 +0800

> diff --git a/net/core/link_watch.c b/net/core/link_watch.c
> index 75431ca..6b9d44b 100644
> --- a/net/core/link_watch.c
> +++ b/net/core/link_watch.c
> @@ -98,6 +98,9 @@ static bool linkwatch_urgent_event(struct net_device *dev)
> if (netif_is_lag_port(dev) || netif_is_lag_master(dev))
> return true;
>
> + if ((dev->flags & IFF_UP) && dev->operstate == IF_OPER_DOWN)
> + return true;
> +
> return netif_carrier_ok(dev) && qdisc_tx_changing(dev);
> }
>

You're bypassing explicitly the logic here:

/*
* Limit the number of linkwatch events to one
* per second so that a runaway driver does not
* cause a storm of messages on the netlink
* socket. This limit does not apply to up events
* while the device qdisc is down.
*/
if (!urgent_only)
linkwatch_nextevent = jiffies + HZ;
/* Limit wrap-around effect on delay. */
else if (time_after(linkwatch_nextevent, jiffies + HZ))
linkwatch_nextevent = jiffies;

Something about this isn't right. We need to analyze what you are seeing,
what device you are using, and what systemd is doing to figure out what
the right place for the fix.

Thank you.

\
 
 \ /
  Last update: 2020-08-05 00:59    [W:2.241 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site