Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751051Ab2FJEUz (ORCPT ); Sun, 10 Jun 2012 00:20:55 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:62517 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750804Ab2FJEUy (ORCPT ); Sun, 10 Jun 2012 00:20:54 -0400 From: Wanpeng Li To: Fengguang Wu Cc: LKML , Jan Kara , Andrew Morton , Peter Zijlstra , Johannes Weiner , linux-mm@kvack.org, Gavin Shan , Wanpeng Li , Wanpeng Li Subject: [PATCH] page-writeback.c: fix update bandwidth time judgment error Date: Sun, 10 Jun 2012 12:20:05 +0800 Message-Id: <1339302005-366-1-git-send-email-liwp.linux@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 33 From: Wanpneg Li 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 --- 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/