Re: [PATCH 09/10] blkcg: move io_service_bytes and io_serviced stats into blkcg_gq

Vivek Goyal
2015-07-14T16:09:10Z

On Sun, Jul 12, 2015 at 02:00:42PM -0400, Tejun Heo wrote:
> Currently, both cfq-iosched and blk-throttle keep track of
> io_service_bytes and io_serviced stats. While keeping track of them
> separately may be useful during development, it doesn't make much
> sense otherwise. Also, blk-throttle was counting bio's as IOs while
> cfq-iosched request's, which is more confusing than informative.

Hi Tejun,

So now blkio.io_serviced will switch to accounting number of bios
instead of number of requests? I feel given other stats, things
are still confusing as other stats will similar name give stats
about requests and not bios.

IMHO, for a policy, either all the stats should be in bio or in terms
of requests. Having a mix of these is even more confusing.

For example, IIUC, now blkio.io_serviced will keep count in terms of
bios while blkio.io_queued will keep count in terms of number of
requests.

If we are keeping common stats at block layer (instead of per policy),
I am wondering if it will make sense to reflect that in new cgroup
files which are common to all policies in that cgroup, instead of being per
policy. And deperecate respective per policy stat files over a period of time.

This will have 3 pros.

- We will not have to deal with any user complaints of suddenly switching
accounting from request to bio for two cfq knobs.

- It will be less confusion otherwise some CFQ knobs will be bio based
while others will be request based.

- It will also get rid of confusion about switching elevators and stat
collection etc.

Thanks
Vivek