public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cfq-iosched: convert group idle time to jiffies
@ 2015-12-29 20:16 Alexandru Moise
  2015-12-29 20:19 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Moise @ 2015-12-29 20:16 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel, 00moses.alexander00

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


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

end of thread, other threads:[~2015-12-29 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-29 20:16 [PATCH v2] cfq-iosched: convert group idle time to jiffies Alexandru Moise
2015-12-29 20:19 ` Jens Axboe
2015-12-29 20:25   ` Alexandru Moise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox