RE: [scsi] write same with NDOB (no data-out buffer) support

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

 



Adding Bob Sheffield from Broadcom.

>
> Hi Kashyap,
>
> > I was going through below discussion as well as going through linux
> > scsi code to know if linux scsi stack support NDOB.
>
> Last time NDOB came up there were absolutely no benefits to it from the
> kernel perspective. These days we can save the buffer memory allocation
so
> there may be a small win. I do have a patch we can revive.


We can test if you have any patch.

>
> However, I am not aware of any devices that actually support NDOB. Plus
it's
> hard to detect since we need to resort to RSOC masks. And blindly
sending
> RSOC is risky business. That's why my patch never went anywhere. It was
a lot
> of heuristics churn to set a single bit flag.
>
> Since the benefits are modest (basically saves a memory compare on the
> device), what is the reason you are looking at this?

SCSI SBC-4 requires that any drive that supports WRITE SAME (unmap=1) also
support ndob=1. So a drive supports it if it reports LBWS=1 in the Block
Provisioning VPD page. If not, the drive violates the SBC-4 standard, so
it's a drive problem.
ssuing WRITE SAME (unmap=1, ndob=0) only achieves block unmapping if the
pattern in the data-out buffer matches the "provisioning initialization
pattern" implemented by the drive.
AFAIK,  current scsi stack isn't somehow determining what that pattern is
for each drive, so eventually current method of using WRITE SAME (unmap=1,
ndob=0)  likely is ineffective in unmapping blocks on media.

On the other hand, if the drive supports WRITE SAME (unmap=1, ndob=1) - as
required by SBC-4 - then Linux can use it to reliably cause LBAs to be
unmapped on media.

Perhaps this is considered a minor issue for direct attached drives, but
in the RAID world, it's a big enough issue that relying on it is the only
way we can reliably maintain coherency across stripes in redundant data
mappings.

>
> > One more question. What happens if WS w/ UNMAP command is passed to
> > the device without zeroed data out buffer in current scsi stack ? Will
> > it permanently disable WS on that device ?
>
> Depends how the device responds.
>
> --
> Martin K. Petersen	Oracle Linux Engineering



[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