Re: [PATCH 3/3] blkio: Add more debug-only per-cgroup stats

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vivek Goyal
Date: Friday, April 9, 2010 - 12:21 pm

On Thu, Apr 08, 2010 at 09:15:35PM -0700, Divyesh Shah wrote:

Divyesh,

This empty_time looks like a redundant stats. One can just look at
group_wait_time. If group_wait_time is  not increasing, then application
in cgroup is not doing any IO. If it is increasing then one can look
at so many other stas like blkio.time, blkio.sectors etc to find out
if cgroup is making any progress or not.

So IMHO, we really don't need anything like empty_time.
  


So what is that inconsistency? Time goes backwards? If yes, can't we just
check that stop time is start time and only then any time sample is
valid otherwise we ignore it?

Why same inconsistency in time (due to tsc resync) can't be introduced between start and stop event window? 

In case of group_wait_time, there does not seem to be any stop event. It
is just start and update event?


I am hoping that you have a good reason to maintain all these stats in ns
and not in us.

My rough calculation says that it will take 584 years to overflow this
:-). So probably ns is not bad.  

2^64/10^9 = 18446744073 sec
18446744073/60 = 307445734 mins
307445734/60 = 5124095 hrs
5124095/24= 213503 days
213503/365= 584 years 

Hopefully this calculation is right.


Will cfq_choose_cfqg() be a better place to call this function. Why should
we call it when an active queue is set. Instead when a group is chosen
to dispatch request from, we can update the wait time.

That way the number of times this function is called will reduce as we
can dispatch multiple cfqqs from single group.


Does this flags has to be inside blkio_group_stats? May be a better
place is inside blkio_group as it represents the blkio_group status.
That's a differnet thing that as of today all three flags are helping out
only for stats purposes but in future we could add more flags?


Why this needs to be called from CFQ? Can't we just internally call this
from blkiocg_update_request_remove_stats() internally. So when we remove
a request, we update the stats in blkio. That time blkio can checek if
group became empty and start the time?


Shouldn't we try to call cfq_del_timer() whereever appropriate, instead of
directy trying to update idle_time_stats?

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

Messages in current thread:
[PATCH 1/3] blkio: Add io_merged stat, Divyesh Shah, (Thu Apr 8, 9:14 pm)
Re: [PATCH 3/3] blkio: Add more debug-only per-cgroup stats, Vivek Goyal, (Fri Apr 9, 12:21 pm)