bdi: use deferable timer for sync_supers task

sync_supers task currently wakes up periodically for superblock
writeback. This hurts power on battery driven devices. This patch
turns this housekeeping timer into a deferable timer so that it
does not fire when system is really idle.

CRs-Fixed: 353700
Change-Id: Idc7953b5d0580546808bc5832291ca570837ee7f
Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Xia Wu <xia.wu@intel.com>
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
This commit is contained in:
Yong Wang 2012-04-26 16:45:46 +05:30 committed by Stephen Boyd
parent 9d04f966d1
commit 9fc2e9e0e1

View file

@ -253,7 +253,9 @@ static int __init default_bdi_init(void)
sync_supers_tsk = kthread_run(bdi_sync_supers, NULL, "sync_supers");
BUG_ON(IS_ERR(sync_supers_tsk));
setup_timer(&sync_supers_timer, sync_supers_timer_fn, 0);
init_timer_deferrable(&sync_supers_timer);
sync_supers_timer.function = sync_supers_timer_fn;
sync_supers_timer.data = 0;
bdi_arm_supers_timer();
err = bdi_init(&default_backing_dev_info);