From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>,
Paul Webb <paul.x.webb@oracle.com>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Phil Auld <pauld@redhat.com>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Ramanan Govindarajan <ramanan.govindarajan@oracle.com>,
Sagi Grimberg <sagi@grimberg.me>,
Nicky Veitch <nicky.veitch@oracle.com>
Subject: Re: [External] : Re: [bug-report] 5-9% FIO randomwrite ext4 perf regression on 6.12.y kernel
Date: Mon, 25 Nov 2024 07:46:58 +0100 [thread overview]
Message-ID: <20241125064658.GA14937@lst.de> (raw)
In-Reply-To: <Z0Dy8H0A3Wj45ZQn@kbusch-mbp.dhcp.thefacebook.com>
On Fri, Nov 22, 2024 at 02:09:04PM -0700, Keith Busch wrote:
> Could you instead try deleting the NVME_QUIRK_DEALLOCATE_ZEROES quirk
> for this device? The driver apparently uses this to assume you meant to
> do a Discard, but it sounds like the device wants an actual Write Zeroes
> command here.
From the logs it sounds like the device does not support the DSM command
at all. Which is a bit weird, but might be an odd OEM firmware of some
kind. If that's the case, the patch below should fix it:
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1a8d32a4a5c3..ca57086ba038 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2068,7 +2068,8 @@ static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id,
lim->physical_block_size = min(phys_bs, atomic_bs);
lim->io_min = phys_bs;
lim->io_opt = io_opt;
- if (ns->ctrl->quirks & NVME_QUIRK_DEALLOCATE_ZEROES)
+ if ((ns->ctrl->quirks & NVME_QUIRK_DEALLOCATE_ZEROES) &&
+ (ns->ctrl->oncs & NVME_CTRL_ONCS_DSM))
lim->max_write_zeroes_sectors = UINT_MAX;
else
lim->max_write_zeroes_sectors = ns->ctrl->max_zeroes_sectors;
next prev parent reply other threads:[~2024-11-25 6:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 21:35 [bug-report] 5-9% FIO randomwrite ext4 perf regression on 6.12.y kernel Saeed Mirzamohammadi
2024-11-21 0:00 ` Chaitanya Kulkarni
2024-11-21 1:20 ` Jens Axboe
2024-11-21 4:57 ` Christoph Hellwig
2024-11-21 14:48 ` Jens Axboe
2024-11-21 11:30 ` Phil Auld
2024-11-21 14:49 ` Jens Axboe
[not found] ` <181bcb70-e0bf-4024-80b7-e79276d6eaf7@oracle.com>
2024-11-21 21:19 ` [External] : " Phil Auld
2024-11-22 12:13 ` Christoph Hellwig
2024-11-22 17:18 ` Paul Webb
2024-11-22 18:26 ` Saeed Mirzamohammadi
2024-11-22 21:09 ` Keith Busch
2024-11-25 6:46 ` Christoph Hellwig [this message]
2024-11-25 18:28 ` Saeed Mirzamohammadi
2024-11-26 4:55 ` Christoph Hellwig
2024-11-26 18:06 ` Saeed Mirzamohammadi
2024-11-26 18:09 ` Christoph Hellwig
2024-11-26 18:13 ` Saeed Mirzamohammadi
2024-11-22 17:13 ` Paul Webb
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=20241125064658.GA14937@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nicky.veitch@oracle.com \
--cc=paul.x.webb@oracle.com \
--cc=pauld@redhat.com \
--cc=ramanan.govindarajan@oracle.com \
--cc=saeed.mirzamohammadi@oracle.com \
--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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.