Re: [PATCH] ibmvscsi driver - sixth version
Dave Boutcher <sleddog <at> us.ibm.com>
2004-03-31 23:12:13 GMT
On Wed, 31 Mar 2004 17:02:02 -0500, Jeff Garzik <jgarzik <at> pobox.com> wrote:
> Comments:
>
> 1) Would be nice to eliminate module options for commands-per-lun,
> max-requests etc. and actually have the driver figure out the real
> needs. One or two options could fall into the "performance tuning"
> category, and stay, but the others are really dependent on the
> underlying configuration and underlying limits.
Hmmm...well, I could collapse the two together, since commands_per_lun
is not limited by anything specific for this adapter. I would prefer
to leave them broken out to handle users who have extreme requirements.
> 2) why is one-descriptor a special case in map_sg_data()? You proceed
> to do the same thing in a loop, right below that... AFAICS you can just
> use the loop, and clamp the number of scatterlist elements to one.
The SRP spec has two different buffer formats: SRP_DIRECT_BUFFER for a
single buffer, and SRP_INDIRECT_BUFFER for lists of buffers, and the
layout of the buffers in the request is different for those two cases.
> 3) in the following code...
>
> + if ((evt_struct->crq.format == VIOSRP_SRP_FORMAT) &&
> + (atomic_dec_if_positive(&hostdata->request_limit) < 0)) {
> + printk("ibmvscsi: Warning, request_limit exceeded\n");
> + unmap_cmd_data(&evt_struct->evt->srp.cmd, hostdata->dev);
> + ibmvscsi_free_event_struct(&hostdata->pool, evt_struct);
> + return SCSI_MLQUEUE_HOST_BUSY;
> + }
>
> is the code prepared to deal with hostdata->request_limit being negative?
(Continue reading)