diff mbox

[6/9] ipv6: addrconf timer changes

Message ID 20100318063123.232844056@vyatta.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger March 18, 2010, 6:31 a.m. UTC
For addrconf timer use round_jiffies to round off to next interval
(rather than manual rounding).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 net/ipv6/addrconf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

YOSHIFUJI Hideaki / 吉藤英明 March 18, 2010, 7:37 a.m. UTC | #1
Hello.

Stephen Hemminger wrote:

> For addrconf timer use round_jiffies to round off to next interval
> (rather than manual rounding).
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> 
> ---
>  net/ipv6/addrconf.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/net/ipv6/addrconf.c	2010-03-15 16:10:25.069213714 -0700
> +++ b/net/ipv6/addrconf.c	2010-03-15 16:10:25.709836446 -0700
> @@ -3194,7 +3194,7 @@ restart:
>  		}
>  	}
>  
> -	addr_chk_timer.expires = time_before(next, jiffies + HZ) ? jiffies + HZ : next;
> +	addr_chk_timer.expires = round_jiffies(next);
>  	add_timer(&addr_chk_timer);
>  	spin_unlock(&addrconf_verify_lock);
>  	rcu_read_unlock_bh();
> 

I'd like to NAK this.

This could round down, but in this routine, the time
is checked.  If the time is not yet, no process and reschedule
happens again.  So, I don't think it is useful.

Well,
   addr_chk_timer.expires = next + HZ;
or
   addr_chk_timer.expires = jiffies_round_up(next);

could be an answer, but it is too lazy and not acceptable for me.
(Well, I don't need 100Hz but I want to have 3-10Hz at least.)

I'll make an alternative patch.

Regards,

--yoshfuji

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

Patch

--- a/net/ipv6/addrconf.c	2010-03-15 16:10:25.069213714 -0700
+++ b/net/ipv6/addrconf.c	2010-03-15 16:10:25.709836446 -0700
@@ -3194,7 +3194,7 @@  restart:
 		}
 	}
 
-	addr_chk_timer.expires = time_before(next, jiffies + HZ) ? jiffies + HZ : next;
+	addr_chk_timer.expires = round_jiffies(next);
 	add_timer(&addr_chk_timer);
 	spin_unlock(&addrconf_verify_lock);
 	rcu_read_unlock_bh();