Skip to contentSkip to conversation

deadline ALWAYS default for dasd devices(s390) ?

DISCUSSION Xose Vazquez Perez 5 participants 6 messages Apr 26, 2010 – May 6, 2010 s390

lore
Share & tools
lore
#0 lore raw

hi,

why is it FORCED ? bypassing a GLOBAL setting and also the kernel command line !!!

drivers/s390/block/dasd.c

/*
* Allocate and initialize request queue and default I/O scheduler. */
static int dasd_alloc_queue(struct dasd_block *block)

{
	int rc;

	block->request_queue = blk_init_queue(do_dasd_request,
					       &block->request_queue_lock);
	if (block->request_queue == NULL)
		return -ENOMEM;

	block->request_queue->queuedata = block;

	elevator_exit(block->request_queue->elevator);
	block->request_queue->elevator = NULL;
	rc = elevator_init(block->request_queue, "deadline");
	if (rc) {
		blk_cleanup_queue(block->request_queue);
		return rc;
	}
	return 0;
}

-thanks-

Signature · 4 lines
«Allá muevan feroz guerra, ciegos reyes por un palmo más de tierra;
que yo aquí tengo por mío cuanto abarca el mar bravío, a quien nadie
impuso leyes. Y no hay playa, sea cualquiera, ni bandera de esplendor,
que no sienta mi derecho y dé pecho a mi valor.»
#1 lore raw
Quoted 21 lines · Xose Vazquez Perez

hi,

why is it FORCED ? bypassing a GLOBAL setting and also the kernel command line !!!

drivers/s390/block/dasd.c

/*
* Allocate and initialize request queue and default I/O scheduler. */
static int dasd_alloc_queue(struct dasd_block *block)

{
	int rc;

	block->request_queue = blk_init_queue(do_dasd_request,
					       &block->request_queue_lock);
	if (block->request_queue == NULL)
		return -ENOMEM;

	block->request_queue->queuedata = block;

	elevator_exit(block->request_queue->elevator);
Quoted 8 lines
	block->request_queue->elevator = NULL;
	rc = elevator_init(block->request_queue, "deadline");
	if (rc) {
		blk_cleanup_queue(block->request_queue);
		return rc;
	}
	return 0;
}

Horst, Stefan W. or Stefan H. should be able to answer your question.

#2 lore raw
Quoted 7 lines · Heiko Carstens
Quoted 4 lines · Xose Vazquez Perez

hi,

why is it FORCED ? bypassing a GLOBAL setting and also the kernel command line !!!

Horst, Stefan W. or Stefan H. should be able to answer your question.

At the time this change was made we had the problem that the default scheduler chosen by the distributions resulted in bad performance for DASD devices.
I don't know what options were considered back then, but I think that having the device driver set a driver specific default is better than forcing the whole system to use 'our' scheduler.

I agree that hard coding this choice into the driver is not pretty,
but it is pragmatic. Some generic mechanism for setting driver specific defaults would be nicer, but I doubt that many other drivers would actually benefit from such an interface.

#3 lore raw
Quoted 13 lines · Stefan Weinhuber
Quoted 5 lines · Xose Vazquez Perez
Quoted 4 lines

hi,

why is it FORCED ? bypassing a GLOBAL setting and also the kernel command line !!!

At the time this change was made we had the problem that the default scheduler chosen by the distributions resulted in bad performance for DASD devices.
I don't know what options were considered back then, but I think that having the device driver set a driver specific default is better than forcing the whole system to use 'our' scheduler.

Quoted 4 lines

I agree that hard coding this choice into the driver is not pretty, but it is pragmatic. Some generic mechanism for setting driver specific defaults would be nicer, but I doubt that many other drivers would actually benefit from such an interface.

See also another thread started just two days ago:

http://lkml.org/lkml/2010/5/3/404

Just... one more data point... ;)

/mjt

#4 lore raw
In reply to Stefan Weinhuber

On 05/05/2010 09:52 AM, Stefan Weinhuber wrote:

hi,

Quoted 3 lines

At the time this change was made we had the problem that the default scheduler chosen by the distributions resulted in bad performance for DASD devices.

Have you done recently new cfq vs. deadline tests, in z/VM and LPAR ?

Quoted 2 lines

I agree that hard coding this choice into the driver is not pretty, but it is pragmatic.

It's awful. Easier and simpler from user space: /sys/block/dasdX/queue/scheduler

Quoted 3 lines

Some generic mechanism for setting driver specific defaults would be nicer, but I doubt that many other drivers would actually benefit from such an interface.

see s390-tools-1.8.4/etc/udev/rules.d/60-readahead.rules That's the way to do it.

-thanks-

Signature · 4 lines
«Allá muevan feroz guerra, ciegos reyes por un palmo más de tierra;
que yo aquí tengo por mío cuanto abarca el mar bravío, a quien nadie
impuso leyes. Y no hay playa, sea cualquiera, ni bandera de esplendor,
que no sienta mi derecho y dé pecho a mi valor.»
#5 lore raw
Quoted 14 lines · Xose Vazquez Perez

On 05/05/2010 09:52 AM, Stefan Weinhuber wrote:

hi,

Quoted 3 lines

At the time this change was made we had the problem that the default scheduler chosen by the distributions resulted in bad performance for DASD devices.

Have you done recently new cfq vs. deadline tests, in z/VM and LPAR ?

Quoted 2 lines

I agree that hard coding this choice into the driver is not pretty, but it is pragmatic.

Quoted 8 lines

It's awful. Easier and simpler from user space: /sys/block/dasdX/queue/scheduler

Quoted 3 lines

Some generic mechanism for setting driver specific defaults would be nicer, but I doubt that many other drivers would actually benefit from such an interface.

see s390-tools-1.8.4/etc/udev/rules.d/60-readahead.rules That's the way to do it.

</lurk>
Hear, hear!

When it's hardcoded, the performance recommendations become a self-fulfilling prophecy since it prevents simple souls like myself from experimenting and show under what circumstances the alternative is more effective. It would not be the first time. I still recall the critsit when some feature of the dasd driver did great in the lab and failed miserably in real life.
I'm even willing to try wrap my brains around udev if I have to ;-) <lurk>

Rob