mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics
@ 2022-02-21  8:41 Oleksij Rempel
  2022-02-23  0:55 ` Jakub Kicinski
  2022-02-23  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Oleksij Rempel @ 2022-02-21  8:41 UTC (permalink / raw)
  To: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Florian Fainelli,
	Vivien Didelot, Vladimir Oltean, David S. Miller, Jakub Kicinski
  Cc: Oleksij Rempel, kernel, netdev, linux-kernel

30 seconds is too long interval especially if it used with ip -s l.
Reduce polling interval to 5 sec.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/dsa/microchip/ksz_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 27cae9f04322..0531aa671574 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -453,7 +453,7 @@ int ksz_switch_register(struct ksz_device *dev,
 	}
 
 	/* Read MIB counters every 30 seconds to avoid overflow. */
-	dev->mib_read_interval = msecs_to_jiffies(30000);
+	dev->mib_read_interval = msecs_to_jiffies(5000);
 
 	/* Start the MIB timer. */
 	schedule_delayed_work(&dev->mib_read, 0);
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics
  2022-02-21  8:41 [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics Oleksij Rempel
@ 2022-02-23  0:55 ` Jakub Kicinski
  2022-02-23  1:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-02-23  0:55 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Florian Fainelli,
	Vivien Didelot, Vladimir Oltean, David S. Miller, kernel, netdev,
	linux-kernel

On Mon, 21 Feb 2022 09:41:29 +0100 Oleksij Rempel wrote:
> 30 seconds is too long interval especially if it used with ip -s l.
> Reduce polling interval to 5 sec.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index 27cae9f04322..0531aa671574 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -453,7 +453,7 @@ int ksz_switch_register(struct ksz_device *dev,
>  	}
>  
>  	/* Read MIB counters every 30 seconds to avoid overflow. */
> -	dev->mib_read_interval = msecs_to_jiffies(30000);
> +	dev->mib_read_interval = msecs_to_jiffies(5000);
>  
>  	/* Start the MIB timer. */
>  	schedule_delayed_work(&dev->mib_read, 0);

Seems reasonable, although who knows how slow the buses get.
In case we need to make it configurable in the future there's already
uAPI for it - stats_block_coalesce_usecs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics
  2022-02-21  8:41 [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics Oleksij Rempel
  2022-02-23  0:55 ` Jakub Kicinski
@ 2022-02-23  1:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-23  1:00 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: woojung.huh, UNGLinuxDriver, andrew, f.fainelli, vivien.didelot,
	olteanv, davem, kuba, kernel, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 21 Feb 2022 09:41:29 +0100 you wrote:
> 30 seconds is too long interval especially if it used with ip -s l.
> Reduce polling interval to 5 sec.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next,v1,1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics
    https://git.kernel.org/netdev/net-next/c/12c740c8683f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-23  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21  8:41 [PATCH net-next v1 1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics Oleksij Rempel
2022-02-23  0:55 ` Jakub Kicinski
2022-02-23  1:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®