From: Maneesh Soni <maneesh@in.ibm.com>
To: Jens Axboe <axboe@suse.de>
Cc: Andrew Morton <akpm@digeo.com>,
ivg2@cornell.edu, linux-kernel@vger.kernel.org, greg@kroah.com,
tytso@us.ibm.com
Subject: Re: kernel BUG at include/linux/dcache.h:271!
Date: Fri, 23 May 2003 18:25:35 +0530 [thread overview]
Message-ID: <20030523125535.GA1805@in.ibm.com> (raw)
In-Reply-To: <20030523124324.GA1661@in.ibm.com>
On Fri, May 23, 2003 at 06:13:24PM +0530, Maneesh Soni wrote:
> On Fri, May 23, 2003 at 08:25:08AM +0200, Jens Axboe wrote:
> > On Thu, May 22 2003, Andrew Morton wrote:
> > > Maneesh Soni <maneesh@in.ibm.com> wrote:
> > > >
> > > > ramdisk
> > > > - should have separate queues on for each ramdisk
> > > >
> > > > elevator
> > > > - should not re-register already registered queue in elv_register_queue
> > > >
> > > > sysfs
> > > > - should handle kobject with multiple parent kobjects
> > >
> > > I can't think of anywhere else where we are likely to want to support
> > > multiple devices from a single queue in this manner, so perhaps the best
> > > solution is to remove the exceptional case: allocate a separate queue for
> > > each ramdisk instance.
> > >
> > > Jens, do you agree?
> >
> > Completely and utterly agree :)
> >
> > --
> > Jens Axboe
>
> Hi,
>
> The following patch provides a separate queue for each ramdisk instance
> and the BUG is not seen now.
>
> Please check whether it is ok or not.
>
> Thanks,
> Maneesh
can't help.. I always have to send patch second time. Please see this one
instead.
- Provides a separate request queue for each ramdisk instance.
drivers/block/rd.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff -puN drivers/block/rd.c~multiqueue_ramdisk drivers/block/rd.c
--- linux-2.5.69/drivers/block/rd.c~multiqueue_ramdisk 2003-05-23 16:04:38.000000000 +0530
+++ linux-2.5.69-maneesh/drivers/block/rd.c 2003-05-23 18:22:31.000000000 +0530
@@ -67,6 +67,7 @@
static struct gendisk *rd_disks[NUM_RAMDISKS];
static struct block_device *rd_bdev[NUM_RAMDISKS];/* Protected device data */
+static struct request_queue *rd_queue;
/*
* Parameters for the boot-loading of the RAM disk. These are set by
@@ -308,12 +309,11 @@ static void __exit rd_cleanup (void)
del_gendisk(rd_disks[i]);
put_disk(rd_disks[i]);
}
-
+ kfree(rd_queue);
devfs_remove("rd");
unregister_blkdev(RAMDISK_MAJOR, "ramdisk" );
}
-static struct request_queue rd_queue;
/* This is the registration and initialization section of the RAM disk driver */
static int __init rd_init (void)
{
@@ -333,23 +333,28 @@ static int __init rd_init (void)
goto out;
}
+ rd_queue = kmalloc(NUM_RAMDISKS * sizeof(struct request_queue),
+ GFP_KERNEL);
+ if (!rd_queue)
+ goto out;
+ memset(rd_queue, 0, NUM_RAMDISKS * sizeof(struct request_queue));
if (register_blkdev(RAMDISK_MAJOR, "ramdisk")) {
err = -EIO;
- goto out;
+ goto out_queue;
}
- blk_queue_make_request(&rd_queue, &rd_make_request);
-
devfs_mk_dir("rd");
for (i = 0; i < NUM_RAMDISKS; i++) {
struct gendisk *disk = rd_disks[i];
+ blk_queue_make_request(&rd_queue[i], &rd_make_request);
+
/* rd_size is given in kB */
disk->major = RAMDISK_MAJOR;
disk->first_minor = i;
disk->fops = &rd_bd_op;
- disk->queue = &rd_queue;
+ disk->queue = &rd_queue[i];
sprintf(disk->disk_name, "ram%d", i);
sprintf(disk->devfs_name, "rd/%d", i);
set_capacity(disk, rd_size * 2);
@@ -362,6 +367,8 @@ static int __init rd_init (void)
NUM_RAMDISKS, rd_size, rd_blocksize);
return 0;
+out_queue:
+ kfree(rd_queue);
out:
while (i--)
put_disk(rd_disks[i]);
_
--
Maneesh Soni
IBM Linux Technology Center,
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: maneesh@in.ibm.com
http://lse.sourceforge.net/
prev parent reply other threads:[~2003-05-23 12:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 23:11 kernel BUG at include/linux/dcache.h:271! Ivan Gyurdiev
2003-05-22 11:57 ` Maneesh Soni
2003-05-22 22:19 ` Andrew Morton
2003-05-23 6:25 ` Jens Axboe
2003-05-23 12:43 ` Maneesh Soni
2003-05-23 12:55 ` Maneesh Soni [this message]
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=20030523125535.GA1805@in.ibm.com \
--to=maneesh@in.ibm.com \
--cc=akpm@digeo.com \
--cc=axboe@suse.de \
--cc=greg@kroah.com \
--cc=ivg2@cornell.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@us.ibm.com \
/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