Subject: Re: Network stack timer hacks for power saving

From: Eric Dumazet <[email-masked]>
Date: Tue, 19 May 2009 11:04:08 +0200

[email-masked] a écrit :
> Hi,
> 
> I have been looking at network stack timer optimization for 
> power saving in embedded ARM environment, basically trying to 
> avoid as many wakeups as possible. I have changed several 
> timers in the network stack into deferred ones, i.e. they do 
> not wake up the device from low power modes but instead they 
> are deferred until next wakeup from some other source, like 
> another (non-deferred) timer or some I/O. Attached a patch 
> about the changes I've done, is something like this safe to do?
> 
> -Tero

Hi Tero

When tcp communications are active, we setup a timer for *every* frame
we receive or we send. These timers wont be deferrable anyway.

delaying one wakeup every 60 seconds (if I take your net/ipv4/route.c change)
wont change that much power savings, or did I missed something ?

On big routers, we need to set ip_rt_gc_interval from 60 seconds to one second,
in order to perform an effective garbage collection.

So, if we use a deferred timer and :

schedule_delayed_work(&expires_work, HZ);

How many times worker will be started every minute ?