* [linux-lvm] Re: System hangs after echo value > /sys/block/dm-0/queue/nr_requests [not found] <20031229130055.GA30647@cistron.nl> @ 2003-12-30 9:32 ` Andrew Morton 2004-01-01 11:29 ` Mike Christie 0 siblings, 1 reply; 3+ messages in thread From: Andrew Morton @ 2003-12-30 9:32 UTC (permalink / raw) To: Miquel van Smoorenburg; +Cc: linux-lvm, linux-kernel, Nick Piggin, Jens Axboe Miquel van Smoorenburg <miquels@cistron.nl> wrote: > > If you echo a value (any value; for example the default 128) to > /sys/block/dm-0/queue/nr_requests the shell you are in hangs. > After about 5 seconds, the whole system hangs 100%. hm, nice. It does the same thing for /sys/block/md0/queue/nr-requests. With CONFIG_DEBUG_SPINLOCK enabled we go BUG in __wake_up(): Program received signal SIGTRAP, Trace/breakpoint trap. __wake_up (q=0xcf299e90, mode=3, nr_exclusive=1) at include/asm/spinlock.h:137 137 BUG(); (gdb) bt #0 __wake_up (q=0xcf299e90, mode=3, nr_exclusive=1) at include/asm/spinlock.h:137 #1 0xc02cc847 in queue_requests_store (q=0xcf299df8, page=0xe <Address 0xe out of bounds>, count=14) at drivers/block/ll_rw_blk.c:2843 #2 0xc02cc907 in queue_attr_store (kobj=0xcf299f68, attr=0xe, page=0xe <Address 0xe out of bounds>, length=14) at drivers/block/ll_rw_blk.c:2892 #3 0xc01aa84f in flush_write_buffer (file=0xe, buffer=0xc0456100, count=14) at fs/sysfs/file.c:205 #4 0xc01aa8ac in sysfs_write_file (file=0xc0493550, buf=0xe <Address 0xe out of bounds>, count=2, ppos=0xc851cf84) at fs/sysfs/file.c:233 #5 0xc016f458 in vfs_write (file=0xc0493550, buf=0x80b2d00 "128\n", count=4, pos=0xc851cf84) at fs/read_write.c:257 #6 0xc016f55e in sys_write (fd=14, buf=0xe <Address 0xe out of bounds>, count=14) at fs/read_write.c:293 Where queue_requests_store() does wake_up(&rl->wait[READ]); It looks like nobody has called blk_init_queue() for this queue and the waitqueue head is uninitialised. No md was in use on this machine: it was simply enabled in kernel config. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-lvm] Re: System hangs after echo value > /sys/block/dm-0/queue/nr_requests 2003-12-30 9:32 ` [linux-lvm] Re: System hangs after echo value > /sys/block/dm-0/queue/nr_requests Andrew Morton @ 2004-01-01 11:29 ` Mike Christie 2004-01-01 11:29 ` Jens Axboe 0 siblings, 1 reply; 3+ messages in thread From: Mike Christie @ 2004-01-01 11:29 UTC (permalink / raw) To: Andrew Morton Cc: Miquel van Smoorenburg, linux-lvm, linux-kernel, Nick Piggin, Jens Axboe [-- Attachment #1: Type: text/plain, Size: 451 bytes --] Andrew Morton wrote: > Where queue_requests_store() does wake_up(&rl->wait[READ]); > > It looks like nobody has called blk_init_queue() for this queue and the > waitqueue head is uninitialised. > DM, MD, rd and loop use blk_alloc_queue and blk_queue_make_request to initialize their queue, because they only use the make_request_fn. The attached patch prevents the queue from being registered if only blk_alloc_queue was called. Mike Christie [-- Attachment #2: queue_attr.patch --] [-- Type: text/plain, Size: 573 bytes --] --- linux-2.6.0-orig/drivers/block/ll_rw_blk.c 2003-12-28 23:09:16.000000000 -0800 +++ linux-2.6.0/drivers/block/ll_rw_blk.c 2003-12-30 16:11:00.690504036 -0800 @@ -2902,7 +2902,7 @@ int blk_register_queue(struct gendisk *d request_queue_t *q = disk->queue; - if (!q) + if (!q || !q->request_fn) return -ENXIO; q->kobj.parent = kobject_get(&disk->kobj); @@ -2929,7 +2929,7 @@ void blk_unregister_queue(struct gendisk { request_queue_t *q = disk->queue; - if (q) { + if (q && q->request_fn) { elv_unregister_queue(q); kobject_unregister(&q->kobj); ^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-lvm] Re: System hangs after echo value > /sys/block/dm-0/queue/nr_requests 2004-01-01 11:29 ` Mike Christie @ 2004-01-01 11:29 ` Jens Axboe 0 siblings, 0 replies; 3+ messages in thread From: Jens Axboe @ 2004-01-01 11:29 UTC (permalink / raw) To: Mike Christie Cc: Andrew Morton, Miquel van Smoorenburg, linux-lvm, linux-kernel, Nick Piggin On Tue, Dec 30 2003, Mike Christie wrote: > Andrew Morton wrote: > > >Where queue_requests_store() does wake_up(&rl->wait[READ]); > > > >It looks like nobody has called blk_init_queue() for this queue and the > >waitqueue head is uninitialised. > > > > DM, MD, rd and loop use blk_alloc_queue and blk_queue_make_request to > initialize their queue, because they only use the make_request_fn. The > attached patch prevents the queue from being registered if only > blk_alloc_queue was called. I'm fine with that patch since we don't have any attributes in there that apply to just remappers. -- Jens Axboe ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-01 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20031229130055.GA30647@cistron.nl>
2003-12-30 9:32 ` [linux-lvm] Re: System hangs after echo value > /sys/block/dm-0/queue/nr_requests Andrew Morton
2004-01-01 11:29 ` Mike Christie
2004-01-01 11:29 ` Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox