Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753681AbbL2RTW (ORCPT ); Tue, 29 Dec 2015 12:19:22 -0500 Received: from mail-ob0-f179.google.com ([209.85.214.179]:34150 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbbL2RTT (ORCPT ); Tue, 29 Dec 2015 12:19:19 -0500 Subject: Re: [PATCH] cfq-iosched: convert slice idle time to jiffies To: Alexandru Moise <00moses.alexander00@gmail.com> References: <20151229010833.GA20593@gmail.com> Cc: linux-kernel@vger.kernel.org From: Jens Axboe Message-ID: <5682C095.70002@kernel.dk> Date: Tue, 29 Dec 2015 10:19:17 -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: <20151229010833.GA20593@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 Content-Length: 1398 Lines: 32 On 12/28/2015 06:08 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 both is 8ms. > > Since the time given by either variables 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. > > In my obervations the area is really active as I've seen that function > get called a lot for each device on my btrfs raid setup during btrfs > check. I've also timed the btrfs check before and after applying the > patch and I might've noticed a very slight improvement in execution > time but the numbers vary too much for me to post any believable > numbers (10 milliseconds difference at most on average). cfqd->cfq_slice_idle is in jiffies, it's not in msecs. -- Jens Axboe -- 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/