unnecessary timer interrupt of slab.c and bdi tasks when the systemis in sleep state

From: Wu, Xia
Date: Thu Sep 30 2010 - 00:03:39 EST


Hi,
I found some unnecessary timer interrupts when the system enter sleep state.
(1) /mm/slab.c
cache_reap() clean up on allocated memory every 2s. If the system is in sleep state, the system is waked-up when this timer expires. In fact,
there isn't more slabs to been cleaned up in sleep state.

(2) /mm/backing-dev.c and /fs/fs-writeback.c
fs-writeback.c and backing-dev.c define a set of bdi tasks which write back dirty date to the file-system. These tasks typically runs
every 5 seconds even there isn't any dirty date in memory. These tasks call schedule_timeout () and schedule_timeout_interruptible().
In fact, there isn't any dirty data in memory when the system is in sleep state.

I think these timers should not wake-up the system when the system is in sleep state. In these cases, these timers only waste the CPU resource
and consume more power.

Regards
xia

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/