Re: Support for global block IO throttling?

From: Vivek Goyal
Date: Fri Apr 01 2011 - 09:58:44 EST


On Fri, Apr 01, 2011 at 10:05:41AM +0200, Juerg Haefliger wrote:
> Hi Vivek,
>
>
> > Also current IO controller does not work for NFS. So if a global limit
> > is imposed in higher layers it will solve that issue too.
> >
> > Also if you implement it above page cache then it should automatically
> > handle the case of async writes too. The downside is that if limits
> > are low, buffered writers will be throttled very frequently.
>
> I'm not exactly sure where in the stack you see this global bandwidth
> controller. What do you mean by 'above the page cache'? I interpret
> this such that access to the page cache would be bandwidth limited as
> well? That doesn't sound right to me.

You are right. For reads it will not make sense to implement it above
page cache as reads coming out of page cache need not be throttled.

So it will probably boil down to that implement buffered write throttling
when entring the page cache and read throttling somewhere below.
generic_make_request()? But that will not take care of network file system
case I think.

May be we can enhance blk_throtl_bio() itself to also check for global
rules and subject bio to first global rules and put in a global
queue. This probably will work for your virtual machine cases but
it does not take care of buffered writes and NFS IO. May be that is
still a good first step towards global IO limit implementation.

Thanks
Vivek
--
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/