lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 26 Mar 2008 00:35:36 -0400
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Daniel Drake <dsd@...too.org>
CC:	netdev@...r.kernel.org, aabdulla@...dia.com
Subject: Re: [PATCH] forcedeth: Use round_jiffies for stats timer

Daniel Drake wrote:
> This timer doesn't need to run at precise times, so round it to a whole
> second to decrease wakeups.
> 
> Signed-off-by: Daniel Drake <dsd@...too.org>
> ---
>  drivers/net/forcedeth.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 801b4d9..3f0d242 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
> @@ -3792,7 +3792,8 @@ static void nv_do_stats_poll(unsigned long data)
>  	nv_get_hw_stats(dev);
>  
>  	if (!np->in_shutdown)
> -		mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
> +		mod_timer(&np->stats_poll,
> +			round_jiffies(jiffies + STATS_INTERVAL));
>  }
>  
>  static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
> @@ -4996,7 +4997,8 @@ static int nv_open(struct net_device *dev)
>  
>  	/* start statistics timer */
>  	if (np->driver_data & (DEV_HAS_STATISTICS_V1|DEV_HAS_STATISTICS_V2))
> -		mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
> +		mod_timer(&np->stats_poll,
> +			round_jiffies(jiffies + STATS_INTERVAL));
>  
>  	spin_unlock_irq(&np->lock);

applied


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ