Messages in this thread | | | Date | Tue, 16 Oct 2012 16:27:06 -0700 | From | Tejun Heo <> | Subject | Re: [PATCH V3] block/throttle: Add IO throttled information in blkio.throttle |
| |
Hello, Robin.
On Tue, Oct 09, 2012 at 02:53:45PM +0800, Robin Dong wrote: > Currently, if the IO is throttled by io-throttle, the SA has no idea of > the situation and can't report it to the real application user about
Please don't use "SA" in the commit message. Just write it out as "system admin" or "userspace" or whatever. It's only gonna confuse people trying to understand the commit later on.
> that he/she has to do something. So this patch adds a new interface > named blkio.throttle.io_queued which indicates how many IOs are > currently throttled. > > The nr_queued[] of struct throtl_grp is of type "unsigned int" and updates > to it are atomic both at 32bit and 64bit platforms, so we could just > read tg->nr_queued only under blkcg->lock. > > Changelog from v2: > Use nr-queued[] of struct throtl_grp for stats instaed of adding new blkg_rwstat.
As I wrote last time, I would prefer exposing the total number queued to blk-throttle rather than exposing the number of bios being currently held and let userland calculate from the difference from throttle.io_serviced. That is simpler and more inline with all other stats.
Thanks.
-- tejun
| |