All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Akinobu Mita <akinobu.mita@gmail.com>, linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH 6/6] scsi_debug: add ability to enable clustering
Date: Sun, 05 Jan 2014 20:14:23 -0500	[thread overview]
Message-ID: <52CA036F.4030404@interlog.com> (raw)
In-Reply-To: <1388964792-3546-7-git-send-email-akinobu.mita@gmail.com>

On 14-01-05 06:33 PM, Akinobu Mita wrote:
> This adds a module parameter to enable clustering.
>
> Without enabling clustering support, the transfer length for read and
> write scsi commands is limited upto 8MB when page size is 4KB and
> sg_tablesize is 2048 (= SCSI_MAX_SG_CHAIN_SEGMENTS).  I would like to
> test commands with more than that transfer length.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
> Cc: Douglas Gilbert <dgilbert@interlog.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> ---
>   drivers/scsi/scsi_debug.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index aca70c1..9297688d 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -196,6 +196,7 @@ static unsigned int scsi_debug_unmap_max_blocks = DEF_UNMAP_MAX_BLOCKS;
>   static unsigned int scsi_debug_unmap_max_desc = DEF_UNMAP_MAX_DESC;
>   static unsigned int scsi_debug_write_same_length = DEF_WRITESAME_LENGTH;
>   static bool scsi_debug_removable = DEF_REMOVABLE;
> +static bool scsi_debug_clustering;
>
>   static int scsi_debug_cmnd_count = 0;
>
> @@ -2787,6 +2788,7 @@ module_param_named(opts, scsi_debug_opts, int, S_IRUGO | S_IWUSR);
>   module_param_named(physblk_exp, scsi_debug_physblk_exp, int, S_IRUGO);
>   module_param_named(ptype, scsi_debug_ptype, int, S_IRUGO | S_IWUSR);
>   module_param_named(removable, scsi_debug_removable, bool, S_IRUGO | S_IWUSR);
> +module_param_named(clustering, scsi_debug_clustering, bool, S_IRUGO);

Umm, clustering is writeable, so: S_IRUGO | S_IWUSR

>   module_param_named(scsi_level, scsi_debug_scsi_level, int, S_IRUGO);
>   module_param_named(sector_size, scsi_debug_sector_size, int, S_IRUGO);
>   module_param_named(unmap_alignment, scsi_debug_unmap_alignment, int, S_IRUGO);
> @@ -3953,6 +3955,8 @@ static int sdebug_driver_probe(struct device * dev)
>   	sdbg_host = to_sdebug_host(dev);
>
>   	sdebug_driver_template.can_queue = scsi_debug_max_queue;
> +	if (scsi_debug_clustering)
> +		sdebug_driver_template.use_clustering = ENABLE_CLUSTERING;
>   	hpnt = scsi_host_alloc(&sdebug_driver_template, sizeof(sdbg_host));
>   	if (NULL == hpnt) {
>   		printk(KERN_ERR "%s: scsi_register failed\n", __func__);
>

And please document this extra parameter for modinfo.
Something like:
   MODULE_PARM_DESC(clustering, "when set enables larger transfers (def=0)");

placed in alphabetical order.

Doug Gilbert


  reply	other threads:[~2014-01-06  1:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05 23:33 [PATCH 0/6] scsi_debug: a few bug fixes and enable clustering support Akinobu Mita
2014-01-05 23:33 ` [PATCH 1/6] scsi_debug: fix false positive logical block reference tag check fail Akinobu Mita
2014-01-10 21:32   ` Martin K. Petersen
2014-01-05 23:33 ` [PATCH 2/6] scsi_debug: make pseudo_primary static Akinobu Mita
2014-01-05 23:33 ` [PATCH 3/6] scsi_debug: fix duplicate dif_errors increment Akinobu Mita
2014-01-10 21:30   ` Martin K. Petersen
2014-01-05 23:33 ` [PATCH 4/6] scsi_debug: fix resp_xdwriteread() return value when running out of memory Akinobu Mita
2014-01-05 23:33 ` [PATCH 5/6] scsi_debug: prepare to enable clustering Akinobu Mita
2014-01-10 21:41   ` Martin K. Petersen
2014-01-12  1:28     ` Akinobu Mita
2014-01-05 23:33 ` [PATCH 6/6] scsi_debug: add ability " Akinobu Mita
2014-01-06  1:14   ` Douglas Gilbert [this message]
2014-01-06 13:00     ` Akinobu Mita

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=52CA036F.4030404@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=JBottomley@parallels.com \
    --cc=akinobu.mita@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.