From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89CC2606A322 for ; Thu, 3 Dec 2026 08:00:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=H5RkZXqB DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=vScWsIZsZALTWw883LeiYsxJG8mqdDv+3Oxv/n2kbwo=; b=H5RkZXqBdsqZRBSMxSUQga/HQa ccQ2jLskuFK+vznJTwHLbt2gdrYgca4XN2uwRg3oKyeOGRsp5eCNW1xEOxD/lmqFyjtMiNFqovUA+ Gyv7yokXJj/87UbMMPP6ujlNEIPug1FwyAuINoAQnXjCqRZ3zGriZSaRQujy9KRDugNDXPCbfTMmm 9YQXWTC5Z7lXPVerEaFIK8q8262u5WDV7ee+w5pNMK3P2iX/GojKKvcmOXnNgoGdNXsUHOy/rWKF3 jdaTR+h0Oc+s5mKwIEUbR1AUaVyfNDiD/k1J5LS4IgKzwO0zsFJyj0vnPEDWgvKp/lCZDz9ngR6V+ ZsoiFjeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ1kM-0000000DnG7-0JGs; Thu, 03 Dec 2026 08:00:54 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ1kH-0000000DnEF-1yjX for linux-nvme@lists.infradead.org; Thu, 03 Dec 2026 08:00:52 +0000 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-Archived-By: 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_000050_150799_A53017D7 X-CRM114-Status: GOOD ( 35.79 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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---