Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH] nvme-pci: adaptively poll completions on busy queues
       [not found] <20260723120556.58670-1-changfengnan@bytedance.com>
@ 2026-07-23 14:46 ` Keith Busch
  0 siblings, 0 replies; only message in thread
From: Keith Busch @ 2026-07-23 14:46 UTC (permalink / raw)
  To: Fengnan Chang
  Cc: linux-nvme, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Bart Van Assche, Andy Shevchenko, Thomas Gleixner, Jun Zeng,
	Gang Cao, Jun I Jin, Liang A Fang, Yong Hu, linux-kernel,
	Guzebing

On Thu, Jul 23, 2026 at 08:05:56PM +0800, Fengnan Chang wrote:
> +static void nvme_adaptive_mask_irq(struct nvme_queue *nvmeq, int irq)
> +{
> +	struct nvme_dev *dev = nvmeq->dev;
> +	struct pci_dev *pdev = to_pci_dev(dev->dev);
> +
> +	if (pdev->msi_enabled) {
> +		writel(BIT(nvmeq->cq_vector), dev->bar + NVME_REG_INTMS);
> +		readl(dev->bar + NVME_REG_INTMS);

Why do you have the readl? That's not necesary.

> +	} else {
> +		disable_irq_nosync(irq);
> +	}
> +}
> +
> +static void nvme_adaptive_unmask_irq(struct nvme_queue *nvmeq, int irq)
> +{
> +	struct nvme_dev *dev = nvmeq->dev;
> +	struct pci_dev *pdev = to_pci_dev(dev->dev);
> +
> +	clear_bit(NVMEQ_ADAPTIVE_POLLING, &nvmeq->flags);
> +	if (pdev->msi_enabled) {
> +		writel(BIT(nvmeq->cq_vector), dev->bar + NVME_REG_INTMC);
> +		readl(dev->bar + NVME_REG_INTMS);

Same here.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260723120556.58670-1-changfengnan@bytedance.com>
2026-07-23 14:46 ` [RFC PATCH] nvme-pci: adaptively poll completions on busy queues Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox