Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdCBOAo (ORCPT ); Thu, 2 Mar 2017 09:00:44 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33604 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbdCBOAk (ORCPT ); Thu, 2 Mar 2017 09:00:40 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Weiwei Jia Date: Thu, 2 Mar 2017 08:51:36 -0500 Message-ID: Subject: Re: [RFC] blkio_delay_total is calculated mistakenly To: Balbir Singh Cc: linux-kernel@vger.kernel.org, Greg KH Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1114 Lines: 32 Ping? Can anyone please add some comments for this change? Thank you. Best, Weiwei Jia On Tue, Feb 14, 2017 at 8:27 PM, Weiwei Jia wrote: > Hi, > > When I read Linux Kernel source codes about how "blkio_delay_total" > (delay waiting for synchronous block I/O to complete for one task) is > calculated in Linux/kernel/delayacct.c file [1], I find that > "blkio_delay_total" adds "task->delays->blkio_delay" to be the total > delay time for one task to wait for synchronous I/O dynamically but > "tsk->delays->blkio_delay" has already been calculated as the total > delay time that one task is waiting for synchronous I/O [2] > dynamically. I think "blkio_delay_total" should not add > "task->delays->blkio_delay" since "task->delays->blkio_delay" is > already the total delay time we want. > > Am I missing anything? > > BTW, the patch in the attachment may solve this problem if I don't > miss anything. Thank you. > > > [1] http://lxr.free-electrons.com/source/kernel/delayacct.c?v=4.7#L121 > [2] http://lxr.free-electrons.com/source/kernel/delayacct.c?v=4.7#L52 > > Thanks, > Weiwei Jia