Re: UNMAP command parameter list

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

 



Christoph Hellwig <hch <at> infradead.org> writes:

> 
> On Mon, Nov 10, 2014 at 11:44:39AM -0500, Martin K. Petersen wrote:
> > You'll have to traverse scatterlist and extract the descriptor from
> > there. You can use scsi_for_each_sg() to walk the list.

  Thank you; I'm working on it.

> > 
> > If you only care about in-kernel discards it's pretty easy since we only
> > issue a single descriptor. If you want to support arbitrary block pc
> > UNMAP commands you'll have to be able to deal with multiple descriptors
> > across multiple scatterlist elements. But the accessor macro makes that
> > easy so I suggest you take that approach.
> 
> Note that if the hardware doesn't actually implement UNMAP and you have
> to emulate something you're probably better off emulating WRITE SAME
> (16) with the UNMAP bit, as the format is a lot easier to handle,
> and it's much better specified to start with.

  Actually, my case is that the HW (at least in its current iteration)
doesn't support WRITE SAME but does support UNMAP. But it seems that the
discard option given to ext4 at mount time is "ineffective" in the sense of
not keeping up a high write transfer rate to the device (it looks like write
amplification is happening, something which discard -- and UNMAP -- ought to
preempt). So now I'm writing code to 'debug' the UNMAP commands which get
passed to the device.


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