2005-03-04 06:44:31

by Florin Iucha

[permalink] [raw]
Subject: are the io-schedulers per-device?

Hello,

For a semester project I am experimenting with a new IO scheduler and I
was trying to set my scheduler to control a single device, to ease the
development and debugging, by using
echo "foo" > /sys/block/ubdc/queue/scheduler
Much to my suprise, this sets the scheduler for the other block
devices as well! Does this happen only to UML block devices? Do I need
to do anything to allow a per-device scheduler? Is the functionality
there, or is it in-progress? Am I reading too much in the fact that
the queue/scheduler is defined under each block device?

Thank you,
florin

PS: Please Cc: me as I am not subscribed.

--

Don't question authority: they don't know either!


Attachments:
(No filename) (681.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2005-03-04 07:22:34

by Jens Axboe

[permalink] [raw]
Subject: Re: are the io-schedulers per-device?

On Fri, Mar 04 2005, Florin Iucha wrote:
> Hello,
>
> For a semester project I am experimenting with a new IO scheduler and I
> was trying to set my scheduler to control a single device, to ease the
> development and debugging, by using
> echo "foo" > /sys/block/ubdc/queue/scheduler
> Much to my suprise, this sets the scheduler for the other block
> devices as well! Does this happen only to UML block devices? Do I need
> to do anything to allow a per-device scheduler? Is the functionality
> there, or is it in-progress? Am I reading too much in the fact that
> the queue/scheduler is defined under each block device?

It's per-queue. In general that is per-device, apparently that is not so
for UML since it shares a queue for several devices. From a cleanliness
and performance POV, it's is far better to have a queue per device
instead of sharing, I would suggest fixing the uml block device.

It looks pretty straight forward to do so, except for ubd_handler().
Which, btw, calls elv_next_request() without holding the queue lock!

--
Jens Axboe