* RE: [patch 1/1] megaraid: Add support for change_queue_depth
@ 2006-07-07 3:22 brking
0 siblings, 0 replies; 4+ messages in thread
From: brking @ 2006-07-07 3:22 UTC (permalink / raw)
To: Kolli, Neela, Ju, Seokmann; +Cc: linux-scsi
---- "Ju wrote:
> Hi,
> Wednesday, July 05, 2006 6:00 PM, brking wrote:
> > Adds support for change_queue_depth so that device
> > queue depth can be changed at runtime through sysfs.
> Can you share any reason to have queue depth chanaged at runtime?
> It is set with MBOX_MAX_SCSI_CMDS at driver attach.
For my own purposes, I've been wanting to try different max queue depths to see how it affects my overall performance when memory is fragmented after the system has been up for a while, so rebooting to try a different queue depth doesn't help me much.
Brian
>
> Thank you,
>
> Seokmann
>
> > -----Original Message-----
> > From: brking@charter.net [mailto:brking@charter.net]
> > Sent: Wednesday, July 05, 2006 6:00 PM
> > To: Kolli, Neela
> > Cc: Ju, Seokmann; linux-scsi@vger.kernel.org; brking@charter.net
> > Subject: [patch 1/1] megaraid: Add support for change_queue_depth
> >
> >
> > Adds support for change_queue_depth so that device
> > queue depth can be changed at runtime through sysfs.
> >
> > Signed-off-by: <brking@charter.net>
> > ---
> >
> >
> > diff -puN
> > drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_de
> > pth drivers/scsi/megaraid/megaraid_mbox.c
> > ---
> > linux-2.6/drivers/scsi/megaraid/megaraid_mbox.c~megaraid_chang
> > e_queue_depth 2006-07-05 14:00:04.000000000 -0500
> > +++ linux-2.6-brking/drivers/scsi/megaraid/megaraid_mbox.c
> > 2006-07-05 16:53:36.000000000 -0500
> > @@ -330,6 +330,21 @@ static struct device_attribute *megaraid
> > NULL,
> > };
> >
> > +/**
> > + * megaraid_change_queue_depth - Change the device's queue depth
> > + * @sdev: scsi device struct
> > + * @qdepth: depth to set
> > + *
> > + * Return value:
> > + * actual depth set
> > + **/
> > +static int megaraid_change_queue_depth(struct scsi_device
> > *sdev, int qdepth)
> > +{
> > + if (qdepth > MBOX_MAX_SCSI_CMDS)
> > + qdepth = MBOX_MAX_SCSI_CMDS;
> > + scsi_adjust_queue_depth(sdev, 0, qdepth);
> > + return sdev->queue_depth;
> > +}
> >
> > /*
> > * Scsi host template for megaraid unified driver
> > @@ -343,6 +358,7 @@ static struct scsi_host_template megarai
> > .eh_device_reset_handler = megaraid_reset_handler,
> > .eh_bus_reset_handler = megaraid_reset_handler,
> > .eh_host_reset_handler = megaraid_reset_handler,
> > + .change_queue_depth = megaraid_change_queue_depth,
> > .use_clustering = ENABLE_CLUSTERING,
> > .sdev_attrs = megaraid_sdev_attrs,
> > .shost_attrs = megaraid_shost_attrs,
> > _
> >
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [patch 1/1] megaraid: Add support for change_queue_depth
@ 2006-07-06 12:16 Ju, Seokmann
2006-07-09 14:13 ` James Bottomley
0 siblings, 1 reply; 4+ messages in thread
From: Ju, Seokmann @ 2006-07-06 12:16 UTC (permalink / raw)
To: brking, Kolli, Neela; +Cc: linux-scsi
Hi,
Wednesday, July 05, 2006 6:00 PM, brking wrote:
> Adds support for change_queue_depth so that device
> queue depth can be changed at runtime through sysfs.
Can you share any reason to have queue depth chanaged at runtime?
It is set with MBOX_MAX_SCSI_CMDS at driver attach.
Thank you,
Seokmann
> -----Original Message-----
> From: brking@charter.net [mailto:brking@charter.net]
> Sent: Wednesday, July 05, 2006 6:00 PM
> To: Kolli, Neela
> Cc: Ju, Seokmann; linux-scsi@vger.kernel.org; brking@charter.net
> Subject: [patch 1/1] megaraid: Add support for change_queue_depth
>
>
> Adds support for change_queue_depth so that device
> queue depth can be changed at runtime through sysfs.
>
> Signed-off-by: <brking@charter.net>
> ---
>
>
> diff -puN
> drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_de
> pth drivers/scsi/megaraid/megaraid_mbox.c
> ---
> linux-2.6/drivers/scsi/megaraid/megaraid_mbox.c~megaraid_chang
> e_queue_depth 2006-07-05 14:00:04.000000000 -0500
> +++ linux-2.6-brking/drivers/scsi/megaraid/megaraid_mbox.c
> 2006-07-05 16:53:36.000000000 -0500
> @@ -330,6 +330,21 @@ static struct device_attribute *megaraid
> NULL,
> };
>
> +/**
> + * megaraid_change_queue_depth - Change the device's queue depth
> + * @sdev: scsi device struct
> + * @qdepth: depth to set
> + *
> + * Return value:
> + * actual depth set
> + **/
> +static int megaraid_change_queue_depth(struct scsi_device
> *sdev, int qdepth)
> +{
> + if (qdepth > MBOX_MAX_SCSI_CMDS)
> + qdepth = MBOX_MAX_SCSI_CMDS;
> + scsi_adjust_queue_depth(sdev, 0, qdepth);
> + return sdev->queue_depth;
> +}
>
> /*
> * Scsi host template for megaraid unified driver
> @@ -343,6 +358,7 @@ static struct scsi_host_template megarai
> .eh_device_reset_handler = megaraid_reset_handler,
> .eh_bus_reset_handler = megaraid_reset_handler,
> .eh_host_reset_handler = megaraid_reset_handler,
> + .change_queue_depth = megaraid_change_queue_depth,
> .use_clustering = ENABLE_CLUSTERING,
> .sdev_attrs = megaraid_sdev_attrs,
> .shost_attrs = megaraid_shost_attrs,
> _
>
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [patch 1/1] megaraid: Add support for change_queue_depth
2006-07-06 12:16 Ju, Seokmann
@ 2006-07-09 14:13 ` James Bottomley
0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2006-07-09 14:13 UTC (permalink / raw)
To: Ju, Seokmann; +Cc: brking, Kolli, Neela, linux-scsi
On Thu, 2006-07-06 at 06:16 -0600, Ju, Seokmann wrote:
> Can you share any reason to have queue depth chanaged at runtime?
> It is set with MBOX_MAX_SCSI_CMDS at driver attach.
In general runtime parameters are far better than module insert time
ones (especially if the subsystem supports it), so is there a reason not
to apply this?
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 1/1] megaraid: Add support for change_queue_depth
@ 2006-07-05 22:00 brking
0 siblings, 0 replies; 4+ messages in thread
From: brking @ 2006-07-05 22:00 UTC (permalink / raw)
To: Neela.Kolli; +Cc: seokmann.ju, linux-scsi, brking
Adds support for change_queue_depth so that device
queue depth can be changed at runtime through sysfs.
Signed-off-by: <brking@charter.net>
---
diff -puN drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_depth drivers/scsi/megaraid/megaraid_mbox.c
--- linux-2.6/drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_depth 2006-07-05 14:00:04.000000000 -0500
+++ linux-2.6-brking/drivers/scsi/megaraid/megaraid_mbox.c 2006-07-05 16:53:36.000000000 -0500
@@ -330,6 +330,21 @@ static struct device_attribute *megaraid
NULL,
};
+/**
+ * megaraid_change_queue_depth - Change the device's queue depth
+ * @sdev: scsi device struct
+ * @qdepth: depth to set
+ *
+ * Return value:
+ * actual depth set
+ **/
+static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth)
+{
+ if (qdepth > MBOX_MAX_SCSI_CMDS)
+ qdepth = MBOX_MAX_SCSI_CMDS;
+ scsi_adjust_queue_depth(sdev, 0, qdepth);
+ return sdev->queue_depth;
+}
/*
* Scsi host template for megaraid unified driver
@@ -343,6 +358,7 @@ static struct scsi_host_template megarai
.eh_device_reset_handler = megaraid_reset_handler,
.eh_bus_reset_handler = megaraid_reset_handler,
.eh_host_reset_handler = megaraid_reset_handler,
+ .change_queue_depth = megaraid_change_queue_depth,
.use_clustering = ENABLE_CLUSTERING,
.sdev_attrs = megaraid_sdev_attrs,
.shost_attrs = megaraid_shost_attrs,
_
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-09 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-07 3:22 [patch 1/1] megaraid: Add support for change_queue_depth brking
-- strict thread matches above, loose matches on Subject: below --
2006-07-06 12:16 Ju, Seokmann
2006-07-09 14:13 ` James Bottomley
2006-07-05 22:00 brking
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.