Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Fengnan <changfengnan@bytedance.com>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@meta.com>,
	linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org,
	tglx@kernel.org, namjain@linux.microsoft.com
Subject: Re: [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation
Date: Thu, 3 Dec 2026 09:00:45 +0100	[thread overview]
Message-ID: <20261203080045.GB29002@lst.de> (raw)
In-Reply-To: <e5de8bb4-6605-47f0-98f0-d7246602e566@bytedance.com>

Where are we with this?  Just waiting for Keith' PCI core bits to land
before doing a resend after that is pulled into the nvme tree?

On Thu, Nov 19, 2026 at 11:31:50AM +0800, Fengnan wrote:
> 在 02/11/26 20:22, Fengnan 写道:
> 
> Hi Keith:
> 
> Any comments?
> 
> > 
> > 
> > 在 29/10/26 10:14, changfengnan 写道:
> >>
> >>> From: "Keith Busch"<kbusch@kernel.org>
> >>> Date:  Wed, Oct 28, 2026, 23:15
> >>> Subject:  Re: [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation
> >>> To: "Christoph Hellwig"<hch@lst.de>
> >>> Cc: "Fengnan"<changfengnan@bytedance.com>, "Keith Busch"<kbusch@meta.com>, <linux-nvme@lists.infradead.org>, <linux-pci@vger.kernel.org>, <tglx@kernel.org>, <namjain@linux.microsoft.com>
> >>> On Wed, Oct 28, 2026 at 04:07:12PM +0100, Christoph Hellwig wrote:
> >>>> On Thu, Oct 22, 2026 at 05:43:54PM +0800, Fengnan wrote:
> >>>>> Hi Keith:
> >>>>>  
> >>>>> I made some modifications to DIM and then implemented a solution
> >>>>> using the DIM framework. 
> >>>>> Based on current testing, the results are now comparable to those of
> >>>>> the previous patch.
> >>>>> Here are the preliminary test results:
> >>>>> https://docs.google.com/spreadsheets/d/1e8LQPnaDhmv50XlAM3XxI0TMQkhbk0bTZwlJP1Hzzdk/edit?gid=188992110#gid=188992110
> >>>>>  
> >>>>> If you agree with this approach, I’ll continue testing and optimizing.
> >>>>  
> >>>> І can't speak for Keith, but I'd really love to see this going forward!
> >>>  
> >>> Same! This is a great problem to solve, but I'm just sorry I don't have
> >>> more cycles to work on the cause. I can quickly respin the msix noflush
> >>> pre-patches to address the naming issues tglx mentioned, and we can take
> >>> nvme in whichever direction has the best performance.
> >>>  
> >>
> >> That sounds good.
> >> I'm currently working on continuously optimizing and testing both
> >> approaches (using DIM and not using DIM). 
> >> I plan to update the code and add new data again next Monday.
> >>
> >> Thanks.
> > 
> > 
> > Hi Keith and Christoph,
> > 
> > I've prepared two implementations of adaptive IRQ polling: one reusing
> > the DIM tuning state machine and one using an NVMe-specific policy.
> > 
> > I tested both with a 158-case fio matrix and additional latency and
> > CPU-contention tests. The results show broadly similar throughput gains
> > over their respective OFF baselines in the tested workloads.
> > 
> > Test data:
> > [1] Non-DIM version:
> > https://docs.google.com/spreadsheets/d/17kmXH9Zkr2jrN-19BwaInSx53HwOdRPJFrZ-Hjlk0_Y/edit?gid=300100#gid=300100
> > 
> > [2] DIM version:
> > https://docs.google.com/spreadsheets/d/18JADnBXWAGkffY_3LsPJ6ftA9DGH6qpNbKvP-lQWLnE/edit?gid=300200#gid=300200
> > 
> > Both implementations are opt-in and choose between IRQ completion and
> > timer-driven polling per I/O queue. They evaluate samples of at least
> > 32,768 completions and use a target polling interval of 10 us. A polling
> > trial must improve the completion rate by more than 1%. Once successful,
> > polling can continue while its rate stays within roughly 1% of the saved
> > IRQ baseline, subject to a completion-progress guard.
> > 
> > Neither implementation uses I/O latency as a tuning metric.
> > 
> > The non-DIM implementation uses explicit rules inside the NVMe driver.
> > It admits polling trials at an IRQ completion rate of about 100k
> > completions/s per queue and applies a fixed completion-count backoff
> > after three consecutive failures.
> > 
> > The DIM implementation uses IRQ and POLL as two profiles. It explores
> > polling without that fixed admission threshold and requires a trial
> > to gain more than both 1% and one completion/ms. While parked on IRQ,
> > it increases the wait between trials from 1 to 2, 4, 8 and then 16 valid
> > IRQ samples. It also discards stale samples and stops the polling timer
> > when the queue drains.
> > 
> > During development, I felt that the version with `dim` required more
> > rules to achieve a similar effect. So, I still prefer the version
> > without `dim` because it’s simpler, easier to understand, and easier
> > to maintain.
> > 
> > Which approach would you prefer?
> > 
> > 
> > All the patches are in the attachment.
---end quoted text---


  reply	other threads:[~2026-12-03  8:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 22:35 [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation Keith Busch
2026-10-13 22:35 ` [RFC PATCH 1/3] genirq: Add disable_irq_nowait() Keith Busch
2026-10-13 22:35 ` [RFC PATCH 2/3] PCI/MSI: Implement irq_mask_nowait() for MSI-x Keith Busch
2026-10-14 17:31   ` Bjorn Helgaas
2026-10-14 21:10     ` Thomas Gleixner
2026-10-14 21:39       ` Keith Busch
2026-10-14 22:18       ` Luigi Rizzo
2026-10-13 22:35 ` [RFC PATCH 3/3] nvme-pci: hybrid irq+polling Keith Busch
2026-10-14  7:58 ` [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation Fengnan
2026-10-22  9:43 ` Fengnan
2026-10-28 15:07   ` Christoph Hellwig
2026-10-28 15:15     ` Keith Busch
2026-10-29  2:14       ` changfengnan
2026-11-02 12:22         ` Fengnan
2026-11-19  3:31           ` Fengnan
2026-12-03  8:00             ` Christoph Hellwig [this message]
2026-12-03  8:14               ` Fengnan

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=20261203080045.GB29002@lst.de \
    --to=hch@lst.de \
    --cc=changfengnan@bytedance.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=tglx@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