Re: [PATCH 1/1] [RFC] block: Add blk_max_rw_sectors attribute

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

 



>>>>> "Brian" == Brian King <brking@xxxxxxxxxxxxxxxxxx> writes:

Brian,

Brian> As defined in the transfer limit table in the block limits VPD
Brian> page section of SBC4, this value is only supposed to apply to a
Brian> small subset of SCSI opcodes. However, we are using that value
Brian> for all SCSI commands.

Well, I guess the real issue here is that we use the same constraint for
FS and BLOCK_PC commands. It's not really the kernel's business to
enforce target device preferences on sg/bsg callers.

The main headache here is that max_sectors_kb in sysfs is widely used by
users that want to tweak their read/write I/O size. So we can't really
change the meaning of that knob, nor do I think it's necessarily a good
idea to introduce a max_rw_sectors_kb (which I agree would have been a
better name for the sysfs knob in the first place).

So I think my preference would be to have an internal max_rw_sectors
queue limit that sd can set based on the VPD. And use that as the limit
for REQ_TYPE_FS requests. I.e. max_sectors and max_sectors_kb need to be
constrained by min_not_zero(max_rw_sectors, max_hw_sectors).

max_hw_sectors would then only indicate the HBA hardware request size
limit which is what BLOCK_PC callers should be constrained by
exclusively.

That way you don't get into having to parse the CDB and other evils.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
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