Re: [PATCH V3] block/throttle: Add IO throttled information inblkio.throttle

From: Tejun Heo
Date: Tue Oct 16 2012 - 19:27:01 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/