linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] page-writeback.c: fix update bandwidth time judgment error
@ 2012-06-10  4:20 Wanpeng Li
  2012-06-10  4:36 ` Fengguang Wu
  0 siblings, 1 reply; 6+ messages in thread
From: Wanpeng Li @ 2012-06-10  4:20 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: LKML, Jan Kara, Andrew Morton, Peter Zijlstra, Johannes Weiner,
	linux-mm, Gavin Shan, Wanpeng Li, Wanpeng Li

From: Wanpneg Li <liwp@linux.vnet.ibm.com>

Since bdi_update_bandwidth function  should estimate write bandwidth at 200ms intervals,
so the time is bdi->bw_time_stamp + BANDWIDTH_INTERVAL == jiffies, but
if use time_is_after_eq_jiffies intervals will be bdi->bw_time_stamp +
BANDWIDTH_INTERVAL + 1.

Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
---
 mm/page-writeback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index c833bf0..099e225 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1032,7 +1032,7 @@ static void bdi_update_bandwidth(struct backing_dev_info *bdi,
 				 unsigned long bdi_dirty,
 				 unsigned long start_time)
 {
-	if (time_is_after_eq_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL))
+	if (time_is_after_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL))
 		return;
 	spin_lock(&bdi->wb.list_lock);
 	__bdi_update_bandwidth(bdi, thresh, bg_thresh, dirty,
-- 
1.7.9.5

--
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>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-10  7:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-10  4:20 [PATCH] page-writeback.c: fix update bandwidth time judgment error Wanpeng Li
2012-06-10  4:36 ` Fengguang Wu
2012-06-10  4:54   ` Wanpeng Li
2012-06-10  7:24     ` Fengguang Wu
2012-06-10  7:41       ` Wanpeng Li
2012-06-10  7:47         ` Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).