Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Fengnan Chang <changfengnan@bytedance.com>
Cc: hch@lst.de, andriy.shevchenko@intel.com, axboe@kernel.dk,
	gang.cao@intel.com, jun.i.jin@intel.com, jun1.zeng@intel.com,
	liang.a.fang@intel.com, linux-kernel@vger.kernel.org,
	linux-nvme@lists.infradead.org, sagi@grimberg.me,
	tglx@kernel.org, yong.hu@intel.com, guzebing@bytedance.com
Subject: Re: [PATCH v1 1/1] nvme-pci: adaptive interrupt coalescing
Date: Tue, 21 Jul 2026 09:11:32 -0600	[thread overview]
Message-ID: <al-MJGguFULZhYDO@kbusch-mbp> (raw)
In-Reply-To: <20260721083739.69676-1-changfengnan@bytedance.com>

On Tue, Jul 21, 2026 at 04:37:39PM +0800, Fengnan Chang wrote:
> @@ -1618,6 +1748,8 @@ static inline bool nvme_poll_cq(struct nvme_queue *nvmeq,
>  		 * the cqe requires a full read memory barrier
>  		 */
>  		dma_rmb();
> +		if (sq_head)
> +			*sq_head = le16_to_cpu(nvmeq->cqes[nvmeq->cq_head].sq_head);

This is the wrong criteria to determine the outstanding depth. The spec
allows the controller to move this forward after it has read an entry.
The commands may still be in progress, so the depth of future
completions to expect can't depend on this value.

But in general, I agree with the spirit of where this is going.

For MSI, you can make use of the INTMS/INTMC NVMe registers to make this
even more efficient. Your patch disables the irq at the cpU level, but
the device is still emitting those messages for no reason.


  parent reply	other threads:[~2026-07-21 15:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  7:57 [PATCH v1 0/1] nvme-pci: adaptive interrupt coalescing Jun Zeng
2026-07-15  7:57 ` [PATCH v1 1/1] " Jun Zeng
2026-07-16 20:52   ` Keith Busch
2026-07-17  1:10     ` Zeng, Jun1
2026-07-17  8:06       ` Shevchenko, Andriy
2026-07-20 15:05     ` Christoph Hellwig
2026-07-20 15:25       ` Keith Busch
2026-07-21  8:37       ` Fengnan Chang
2026-07-21 10:07         ` Andy Shevchenko
2026-07-21 15:11         ` Keith Busch [this message]
2026-07-22  2:22           ` changfengnan
2026-07-17 17:06 ` [PATCH v1 0/1] " Bart Van Assche
2026-07-20  5:24   ` Zeng, Jun1
2026-07-20 14:53     ` Keith Busch
2026-07-20 14:59   ` Christoph Hellwig

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=al-MJGguFULZhYDO@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=axboe@kernel.dk \
    --cc=changfengnan@bytedance.com \
    --cc=gang.cao@intel.com \
    --cc=guzebing@bytedance.com \
    --cc=hch@lst.de \
    --cc=jun.i.jin@intel.com \
    --cc=jun1.zeng@intel.com \
    --cc=liang.a.fang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=tglx@kernel.org \
    --cc=yong.hu@intel.com \
    /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