From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753985AbbL2UUC (ORCPT ); Tue, 29 Dec 2015 15:20:02 -0500 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33388 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753821AbbL2UT7 (ORCPT ); Tue, 29 Dec 2015 15:19:59 -0500 Subject: Re: [PATCH v2] cfq-iosched: convert group idle time to jiffies To: Alexandru Moise <00moses.alexander00@gmail.com> References: <20151229201649.GA31593@gmail.com> Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org From: Jens Axboe Message-ID: <5682EAED.9070401@kernel.dk> Date: Tue, 29 Dec 2015 13:19:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151229201649.GA31593@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/29/2015 01:16 PM, Alexandru Moise wrote: > 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. Again, the slice idle values are stored in jiffies, there's no need to convert. I think you are missing the fact that we display the value in msecs, and convert when displaying/storing through sysfs. -- Jens Axboe