Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
From: Eduard Hasenleithner <eduard@hasenleithner.at>
To: Keith Busch <kbusch@kernel.org>
Cc: Sagi Grimberg <sagi@grimberg.me>, linux-nvme@lists.infradead.org
Subject: Re: [RFC PATCH] Workaround for discard on non-conformant nvme devices
Date: Wed, 6 Nov 2019 22:10:58 +0100
Message-ID: <ea1ddc8d-9612-1fa1-09bc-ce803b0a38ef@hasenleithner.at> (raw)
In-Reply-To: <20191106204329.GB32215@redsun51.ssa.fujisawa.hgst.com>

On 06.11.19 21:43, Keith Busch wrote:
> On Wed, Nov 06, 2019 at 09:22:00PM +0100, Eduard Hasenleithner wrote:
>> Couldn't we just simply use the discard_page for all discards?
> 
> That's normally just a fallback to ensure forward progress under memory
> pressure. It's not particularly performant, though.

So we are accepting a considerable performance impact for the "broken" 
devices?

>> Are there even nvme devices out there which have conformant behavior in this
>> respect?
> 
> I believe most of them do conform, but I don't have a large sample size
> to confirm.

Do you have an IO-MMU active on your setup? In my setup it is active and 
the nvme is directly attached to the CPU. So the CPU exactly knows the 
intiator and the IO-MMU page table defines with page granularity which 
memory the nvme may read or write. I'm under the impression that 
slightly older setups may be less restrictive wrt DMA IO.

Another aspect is that vendors probably only test with windows and I'm 
guessing that windows doesn't bother with maintaining anything but page 
sized/aligned memory for issuing discard commands.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 21:47 Eduard Hasenleithner
2019-11-06 16:52 ` Sagi Grimberg
2019-11-06 18:23   ` Keith Busch
2019-11-06 20:22     ` Eduard Hasenleithner
2019-11-06 20:43       ` Keith Busch
2019-11-06 21:10         ` Eduard Hasenleithner [this message]
2019-11-06 21:34           ` Keith Busch

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=ea1ddc8d-9612-1fa1-09bc-ce803b0a38ef@hasenleithner.at \
    --to=eduard@hasenleithner.at \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git