mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nate Diller <nate.diller@gmail.com>
To: Jens Axboe <axboe@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	cmm@us.ibm.com, seelam@cs.utep.edu, linux-kernel@vger.kernel.org,
	ext2-devel@lists.sourceforge.net
Subject: [PATCH 2/2][RESEND] Default iosched fixes (was: Fall back io scheduler for 2.6.15?)
Date: Fri, 20 Jan 2006 15:24:55 -0800	[thread overview]
Message-ID: <5c49b0ed0601201524x26225a77k94a1eb95bc601883@mail.gmail.com> (raw)
In-Reply-To: <5c49b0ed0601201517h3126ac8dp931bab93a85bf9c5@mail.gmail.com>

Jens has decided that allowing the default scheduler to be a module is
a bug, and should not be allowed under kconfig.  However, I find that
scenario useful for debugging, and wish for the kernel to be able to
handle this situation without OOPSing, if I enable such an option in
the .config directly.  This patch dynamically checks for the presence
of the compiled-in default, and falls back to no-op, emitting a
suitable error message, when the default is not available

Tested for a range of boot options on 2.6.16-rc1-mm2.

Signed-off-by: Nate Diller <nate.diller@gmail.com>

--- ./block/elevator.c	2006-01-20 14:52:53.000000000 -0800
+++ ./block/elevator.c	2006-01-20 15:00:16.000000000 -0800
@@ -169,10 +169,12 @@ int elevator_init(request_queue_t *q, ch
 	if (name && !(e = elevator_get(name)))
 		return -EINVAL;

-	if (!e && !(e = elevator_get(chosen_elevator))) {
-		e = elevator_get(CONFIG_DEFAULT_IOSCHED);
-		if (*chosen_elevator)
-			printk("I/O scheduler %s not found\n", chosen_elevator);
+	if (!e && *chosen_elevator && !(e = elevator_get(chosen_elevator)))
+		printk("I/O scheduler %s not found\n", chosen_elevator);
+
+	if (!e && !(e = elevator_get(CONFIG_DEFAULT_IOSCHED))) {
+		printk("Default I/O scheduler not found, using no-op\n");
+		e = elevator_get("noop");
 	}

 	eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL);

  reply	other threads:[~2006-01-20 23:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-20  0:04 [PATCH] " Nate Diller
2006-01-20  8:11 ` Jens Axboe
2006-01-20 23:17   ` [PATCH 1/2][RESEND] " Nate Diller
2006-01-20 23:24     ` Nate Diller [this message]
2006-01-21 11:40       ` [PATCH 2/2][RESEND] " Jens Axboe
2006-01-21 11:48     ` [PATCH 1/2][RESEND] " Jens Axboe
2006-01-23 19:50       ` Nate Diller
2006-01-23 21:02         ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c49b0ed0601201524x26225a77k94a1eb95bc601883@mail.gmail.com \
    --to=nate.diller@gmail.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=cmm@us.ibm.com \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seelam@cs.utep.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®