Commit fb25fbf0 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] elevator: print default selection

Currently we only print the default io scheduler if the kernel chooses,
not if the user/bootloader has specified one. This patch saves the extra
line in dmesg but always notified of the default choice by appending
(default) to that line:

	..
	io scheduler noop registered
	io scheduler anticipatory registered
	io scheduler deadline registered
	io scheduler cfq registered (default)
	..

Patch originally from Srihari Vijayaraghavan, modified by me.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 256e7fe0
...@@ -170,8 +170,6 @@ static void elevator_setup_default(void) ...@@ -170,8 +170,6 @@ static void elevator_setup_default(void)
#else #else
#error "You must build at least 1 IO scheduler into the kernel" #error "You must build at least 1 IO scheduler into the kernel"
#endif #endif
printk(KERN_INFO "elevator: using %s as default io scheduler\n",
chosen_elevator);
} }
static int __init elevator_setup(char *str) static int __init elevator_setup(char *str)
...@@ -515,7 +513,10 @@ int elv_register(struct elevator_type *e) ...@@ -515,7 +513,10 @@ int elv_register(struct elevator_type *e)
list_add_tail(&e->list, &elv_list); list_add_tail(&e->list, &elv_list);
spin_unlock_irq(&elv_list_lock); spin_unlock_irq(&elv_list_lock);
printk(KERN_INFO "io scheduler %s registered\n", e->elevator_name); printk(KERN_INFO "io scheduler %s registered", e->elevator_name);
if (!strcmp(e->elevator_name, chosen_elevator))
printk(" (default)");
printk("\n");
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(elv_register); EXPORT_SYMBOL_GPL(elv_register);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment