Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbbL2URD (ORCPT ); Tue, 29 Dec 2015 15:17:03 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35897 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753661AbbL2URA (ORCPT ); Tue, 29 Dec 2015 15:17:00 -0500 From: Alexandru Moise <00moses.alexander00@gmail.com> X-Google-Original-From: Alexandru Moise <00moses.alexader00@gmail.com> Date: Tue, 29 Dec 2015 21:16:49 +0100 To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, 00moses.alexander00@gmail.com Subject: [PATCH v2] cfq-iosched: convert group idle time to jiffies Message-ID: <20151229201649.GA31593@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 43 This patch refers to Jens Axboe's change way back in 2006: 7b14e3b52 cfq-iosched: slice expiry fixups In this patch he fixed a potential timer race condition by delaying idle_slice_timer by the slice_idle time value. Today this timer is delayed by either slice_idle or group_idle time values, which on my system, and according to Documentation/block/cfq-iosched.txt the default value for group_idle is 8ms. Since the time given by group_idle is supposed to be in milliseconds we should convert that value from milliseconds to jiffies before adding it to jiffies variable and setting our timer. Signed-off-by: Alexandru Moise <00moses.alexader00@gmail.com> --- V2: slice_idle not in miliseconds, convert only group_idle block/cfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 1f9093e..088c45d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2954,7 +2954,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd) cfq_mark_cfqq_wait_request(cfqq); if (group_idle) - sl = cfqd->cfq_group_idle; + sl = msecs_to_jiffies(cfqd->cfq_group_idle); else sl = cfqd->cfq_slice_idle; -- 1.9.1 -- 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/