From: Yong Wang <yong.y.wang@linux.intel.com>
To: Jens Axboe <jaxboe@fusionio.com>, Christoph Hellwig <hch@lst.de>,
Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
Wu Fengguang <fengguang.wu@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, xia.wu@intel.com
Subject: [PATCH] bdi: use deferable timer for sync_supers task
Date: Fri, 8 Oct 2010 16:35:14 +0800 [thread overview]
Message-ID: <20101008083514.GA12402@ywang-moblin2.bj.intel.com> (raw)
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.
Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Xia Wu <xia.wu@intel.com>
---
mm/backing-dev.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 65d4204..9a8daa5 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -238,7 +238,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);
--
1.5.5.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2010-10-08 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 8:35 Yong Wang [this message]
2010-10-08 9:25 ` Christoph Hellwig
2010-10-08 10:02 ` Artem Bityutskiy
2010-10-08 10:04 ` Wu, Xia
2010-10-08 10:09 ` Artem Bityutskiy
2010-10-08 10:27 ` Wu, Xia
2010-10-08 10:28 ` Artem Bityutskiy
2010-10-08 10:27 ` Yong Wang
2010-10-08 13:57 ` Wu Fengguang
2010-10-08 14:42 ` Wu Fengguang
2010-10-08 13:59 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101008083514.GA12402@ywang-moblin2.bj.intel.com \
--to=yong.y.wang@linux.intel.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=fengguang.wu@intel.com \
--cc=hch@lst.de \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xia.wu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox