Re: [PATCH 1/2] target: Add transport_handle_cdb_direct optimization

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

 



On 06/04/2011 07:03 AM, Christoph Hellwig wrote:
>> + */
>> +int transport_handle_cdb_direct(
>> +	struct se_cmd *cmd)
>> +{
>> +	if (!cmd->se_lun) {
>> +		dump_stack();
>> +		printk(KERN_ERR "cmd->se_lun is NULL\n");
>> +		return -EINVAL;
>> +	}
>> +	if (in_interrupt()) {
>> +		dump_stack();
>> +		printk(KERN_ERR "transport_generic_handle_cdb cannot be called"
>> +				" from interrupt context\n");
>> +		return -EINVAL;
>> +	}
>> +
>> +	return transport_generic_new_cmd(cmd);
> 
> I can't really see any reason to add this helper.  It just adds rather
> pointless debug checks for cases that already will blow up "properly" with
> the current code.  Let's keep the callchain lean and just leave it out.

I agree. Also, I don't think there should be a handle_cdb_direct because
I think handle_cdb should call transport_generic_new_cmd, we don't need
a "direct" version. transport_generic_new_cmd should be safe (or made
safe) for calling from interrupt context. There's nothing in it that
demands it be executed in the backstore thread's context, and doing so
just incurs a two context switch latency penalty.

Regards -- Andy
--
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