Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.95.11.211 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796284850; b=A57pqv+3o1H1J+vllchQI+R5lisjZpo9UUKU8LFI1eTtwOhJVqjzRgXAC6Vq+LwStt7M jG0o8ZAKlWSU7fCd1MMTtloZ2j/5P6W8INcoAR2exGTHHufwPPOy7h9aaHf7bhzntaR06 PW9U/Vzck+oXQyhAWVtcUCcVwvZj/MFIIUMp4HzNUazPdmer6PR0egy5Z7+GnVL60Ij9w LDBBgrdXXT515WW0gEuQcSYIPHZZZH9twuTScVCOm0B36NBNB8LzELixtwR/hL4r7HEjc 1hGhsN+UvrJJfBaT4XVKx2KJyRxQPGoi+JPt+/dqEwdYCiWislThGf2feQqrHghCETQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796284850; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To:User-Agent; bh=vScWsIZsZALTWw883LeiYsxJG8mqdDv+3Oxv/n2kbwo=; b=aJnTtOWQc7ZbtDnuYKH7p/NO1L+6QYl7U2rlzccDhEv9nyMAh1j5tKY6iAcW5iVUwJ2D aEeEXINFbphUTuemzJ7QHqbEmDQ8Xz9+t0KkC+kL+aSSzou72Yed9WTzbhZaEJgyPOjIo /7+tbNwGSERaTlogR3GbmXVkAJOz2SJ0b4RLpivKYh6mY6jMBNeE/HW+WAE5RY6ZEeNf4 27J/1c4hWPyHjG3SkWFv4VsqT/+MCL2S+C6Rr+7gOnN2/apnl4wnDJV+SQR0eoUA9DT0u DOAOjoeBTH6OcVQpnoy/p9zn6NVytxROR2TNGG5oc9rvv6VyF/ZPTn0Qt6/RLq2vokA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.remote-ip=213.95.11.211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77DE4606A322 for ; Thu, 3 Dec 2026 08:00:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 77DE4606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 24CEC68BFE; Thu, 3 Dec 2026 09:00:46 +0100 (CET) Date: Thu, 3 Dec 2026 09:00:45 +0100 From: Christoph Hellwig To: Fengnan Cc: Keith Busch , Christoph Hellwig , Keith Busch , 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 Message-ID: <20261203080045.GB29002@lst.de> References: <20261013223543.395054-1-kbusch@meta.com> <16e8bc03-42c2-4bc8-bce9-dab49aad66b8@bytedance.com> <20261028150712.GA16374@lst.de> <8d42a690-79f7-4431-bffb-73decfc97dad@bytedance.com> X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) 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" > >>> Date:  Wed, Oct 28, 2026, 23:15 > >>> Subject:  Re: [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation > >>> To: "Christoph Hellwig" > >>> Cc: "Fengnan", "Keith Busch", , , , > >>> 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---