Re: [PATCH 1/2] mpt2sas: Remove acquisition of host_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 06, 2011 at 09:45:55AM -0400, Christoph Hellwig wrote:
> On Tue, Apr 05, 2011 at 05:43:55PM -0400, Matthew Wilcox wrote:
> > 
> > We can eliminate the use of the scsi command serial_number, as the race
> > that the driver is checking for cannot happen.
> > 
> > Then the driver no longer needs to use the DEF_SCSI_QCMD() macro and no
> > longer acquires the host_lock.  This improves performance substantially
> > on high-IOPS workloads.
> 
> Looks fine.  Note that this somehow clashes with my patch to simply
> remove the serial_number check from mpt2sas.  We could just drop my
> smaller patch if this one gets in in a timely fashion.

We should probably split this patch apart into the serial_number removal
and then the host_lock removal anyway.

But I don't think your patch is correct:

-               if (scmd_lookup && (scmd_lookup->serial_number ==
-                   scmd->serial_number))
+               if (scmd_lookup)
                        rc = FAILED;
                else
                        rc = SUCCESS;

The second part of the conditional is always false (right?  because that
command can't be in flight).

So that's (scmd_lookup && 0), which is if (0), so we can just state rc
= SUCCESS.  Or is my reasoning faulty somewhere?
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux