Subject: neigh_periodic_timer expires too often

From: Luciano Coelho <[email-masked]>
Date: Thu, 30 Jul 2009 13:44:21 +0300

Hi,

We were making some measurements and trying to figure out which timers 
in the kernel can be made deferrable so that our device doesn't have to 
wake up too often.

During this investigation, we found out that the neigh_periodic_timer is 
expiring approximately every 8 seconds, even when we don't have a 
network connection established.  After the connection is established, 
the timer starts expiring every 2 seconds and continues to expire at 
this interval after the connection is closed.

We have been converting many of the kernel times to deferrable timers.  
Checking the netdev mailing list archives, I found out that this issue 
has been discussed in December 2007 [1], but the thread seems to have 
died out and the proposed patch has never been applied AFAICS.

Another proposed solution, which has never been applied either, was to 
convert this timer from softirq-based to workqueue-based [2].  Would 
that be any better?

So, my question is, does it make sense to make this timer deferrable or 
use the workqueue instead? Or is there any other better solution to 
avoid unnecessarily frequent wakeups caused by neigh_periodic_timer?

We are using a kernel based on 2.6.28.

[1] http://article.gmane.org/gmane.linux.network/81361
[2] http://article.gmane.org/gmane.linux.network/81140

-- 
Cheers,
Luca.