public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andras Kovacs <akovacs@fixstars.com>
To: linux-scsi@vger.kernel.org
Subject: Re: UNMAP command parameter list
Date: Mon, 10 Nov 2014 18:10:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20141110T190036-243@post.gmane.org> (raw)
In-Reply-To: 20141110174043.GA26944@infradead.org

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.



      parent reply	other threads:[~2014-11-10 18:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 23:30 UNMAP command parameter list Andras Kovacs
2014-11-07 23:57 ` Elliott, Robert (Server Storage)
2014-11-08 20:22   ` Andras Kovacs
2014-11-10 15:56     ` Andras Kovacs
2014-11-10 16:44       ` Martin K. Petersen
2014-11-10 17:40         ` Christoph Hellwig
2014-11-10 17:52           ` Martin K. Petersen
2014-11-10 18:10           ` Andras Kovacs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20141110T190036-243@post.gmane.org \
    --to=akovacs@fixstars.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox