Re: [1/1] Block device throttling [Re: Distributed storage.]
From: Evgeniy Polyakov <hidden>
Date: 2007-08-08 13:28:53
Also in:
lkml, netdev
From: Evgeniy Polyakov <hidden>
Date: 2007-08-08 13:28:53
Also in:
lkml, netdev
On Wed, Aug 08, 2007 at 02:17:09PM +0400, Evgeniy Polyakov (johnpol@2ka.mipt.ru) wrote:
This throttling mechanism allows to limit maximum amount of queued bios per physical device. By default it is turned off and old block layer behaviour with unlimited number of bios is used. When turned on (queue limit is set to something different than -1U via blk_set_queue_limit()), generic_make_request() will sleep until there is room in the queue. number of bios is increased in generic_make_request() and reduced either in bio_endio(), when bio is completely processed (bi_size is zero), and recharged from original queue when new device is assigned to bio via blk_set_bdev(). All oerations are not atomic, since we do not care about precise number of bios, but a fact, that we are close or close enough to the limit. Tested on distributed storage device - with limit of 2 bios it works slow :)
As addon I can cook up a patch to configure this via sysfs if needed. Thoughts? -- Evgeniy Polyakov