Re: [PATCH 2/3][v2] blkio: Add io controller stats like

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vivek Goyal
Date: Monday, April 5, 2010 - 9:06 am

On Fri, Apr 02, 2010 at 06:56:35PM -0700, Divyesh Shah wrote:

Hi Divyesh,

Looking the third patch where you acutally increment the stats, this is
how service time is calculated.

- Save start_time in rq, when driver actually removes the request from
  request queue.
- at request completion time calculate service time.
  service_time = now - start_time.

This works very well if driver/device does not have NCQ and process one
request at a time. But with NCQ, we can multiple requests in the driver
queue at the same time then we can run into issues.

- With NCQ, time becomes cumulative. So if three requests rq1, rq2 and rq3
  are in disk queue, and if requests are processed in the order rq1,rq2,rq3 by
  the disk (no parallel channles), then rq1 and rq2's completion time is
  added in rq3. So total service time of the group can be much more than
  actual time elapsed. That does not seem right. Did you face this issue in
  your testing?


Same is the case with io_wait_time, Because time is cumulative, actual
io_wait_time, can be more than real time elapsed.

Is this the intention and you are finding even cumulative time useful?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3][v2] blkio: IO controller stats, Divyesh Shah, (Fri Apr 2, 6:54 pm)
[PATCH 2/3][v2] blkio: Add io controller stats like, Divyesh Shah, (Fri Apr 2, 6:56 pm)
Re: [PATCH 2/3][v2] blkio: Add io controller stats like, Vivek Goyal, (Mon Apr 5, 9:06 am)
[No subject], Divyesh Shah, (Tue Apr 6, 10:00 am)