Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.127.230.112 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796285702; b=x0Aa0CCkFW8IXjDbYsfc2whe+lO6ZHmJj1jVKpLwr5XUgu6j+i3DP3TV5UK9GOeMY89E RomUyVHYwGfmGFpPqNVkTjLWmv+jgigzC3RYFh5ksfiovpW/jZ9EZZRvh/wcoIfCPB6yB 5euz/DGCyke/uoY67fbm0SJDdvsA2PXDJwSF88Dsx8lOb4YSPXLcASQYShqHjqySotoST RRdX19e51AkUGQF76cEl7Tn8JNZNrqJcCBwMj5x/VbNNysQrjvngd7z4v79LPVoV+bsbs ByYq0Zx+tdNgDXk/+DIB441pvxX+YQUD4cMqxIABoRmxjTV9CLzGFubDC3mV2hsf44g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796285702; h=DMARC-Filter:DKIM-Signature:Date:Mime-Version:X-Original-From: User-Agent:To:Content-Transfer-Encoding:Content-Type:Subject: References:Message-Id:From:In-Reply-To:X-Lms-Return-Path:Cc; bh=B1GInJO+XmaionNcdgbGl1ITUY6UWg/iVmRmXAG80xg=; b=i8oe9WhLAKTgLfKP+xb0IXwtT8kBxnAIfREkOq0FXlh3EmHxSlqNj2Xe7zvf8tkC8Yjr qPmGB9K+33MCE6oT4pbNYUv8kSpPMDRW2NIjEq4qr0jiWC0aWtgk90H+JTz5yllUpgkuk D8LvRrnphurG4vu683faPsSvvtuZrlUfXxNJ3P4BhdIn5bZaOLfCfZLGQYNnGjFJAg+mt J5O3UH3qjQDsuXu10v3KywU9PtAaeYHpUdR1wXOU/jclzz7IMw9g9sT0O5B5KnzJZEuJW FDWgv4gnfoDDi1EY2zFwMlENdudsDYkGZwUtZsBnV6a8T+JfXRMINuS9V0UFGSRNhVQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass header.d=bytedance.com header.i=@bytedance.com header.a=rsa-sha256 header.s=2212171451 header.b=CNjLyru+; arc=none smtp.remote-ip=209.127.230.112 Received: from va-1-112.ptr.blmpb.com (va-1-112.ptr.blmpb.com [209.127.230.112]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C4E2606A322 for ; Thu, 3 Dec 2026 08:15:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3C4E2606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=bytedance.com header.i=@bytedance.com header.a=rsa-sha256 header.s=2212171451 header.b=CNjLyru+ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1796285691; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=B1GInJO+XmaionNcdgbGl1ITUY6UWg/iVmRmXAG80xg=; b=CNjLyru+gisfa3vgynVd9BFQHWcBmt4TJUOpAij0pv1cGLrhUjm3BSsvVeB0OV2hT+tZAI t+AIbOcSc7GaFBacAJ9xMqsvrD0+M2d37tZKugJAFdbuOQtLUs/B41AhkE+KQWxQuwJ5Cc JAj3FK17+QCHFEW4mMBhhN7YryrjJdI0MiHQFskVDICvKWw7bveW7kDS2O7Rqvc2JL3ryQ Ozeaajat65HEdMk0JJAFyORgZBqw8Ct0kk2NbDcLkP+PoMuSv9r11QGZd2uJVatlyj3toF kBjDc3NvKxVaeJAjeeCBtYKrZIDb1V7tsOCfIZukAy+Ry1TMHecOCJBbdDRF7w== Date: Thu, 3 Dec 2026 16:14:36 +0800 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 X-Original-From: Fengnan User-Agent: Mozilla Thunderbird To: "Christoph Hellwig" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC PATCH 0/3] nvme-pci: dynamic interrupt moderation 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> <20261203080045.GB29002@lst.de> Message-Id: From: "Fengnan" In-Reply-To: <20261203080045.GB29002@lst.de> X-Lms-Return-Path: Cc: "Keith Busch" , "Keith Busch" , , , , For me, I hope Keith will choose a direction: DIM or non-DIM, and then I=E2=80=99ll move forward in that direction. DIM is fine with me, too. =E5=9C=A8 03/12/26 16:00, Christoph Hellwig =E5=86=99=E9=81=93: > 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? >=20 > On Thu, Nov 19, 2026 at 11:31:50AM +0800, Fengnan wrote: >> =E5=9C=A8 02/11/26 20:22, Fengnan =E5=86=99=E9=81=93: >> >> Hi Keith: >> >> Any comments? >> >>> >>> >>> =E5=9C=A8 29/10/26 10:14, changfengnan =E5=86=99=E9=81=93: >>>> >>>>> From: "Keith Busch" >>>>> Date:=C2=A0 Wed, Oct 28, 2026, 23:15 >>>>> Subject:=C2=A0 Re: [RFC PATCH 0/3] nvme-pci: dynamic interrupt modera= tion >>>>> 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: >>>>>>> =C2=A0 >>>>>>> I made some modifications to DIM and then implemented a solution >>>>>>> using the DIM framework.=C2=A0 >>>>>>> Based on current testing, the results are now comparable to those o= f >>>>>>> the previous patch. >>>>>>> Here are the preliminary test results: >>>>>>> https://docs.google.com/spreadsheets/d/1e8LQPnaDhmv50XlAM3XxI0TMQkh= bk0bTZwlJP1Hzzdk/edit?gid=3D188992110#gid=3D188992110 >>>>>>> =C2=A0 >>>>>>> If you agree with this approach, I=E2=80=99ll continue testing and = optimizing. >>>>>> =C2=A0 >>>>>> =D0=86 can't speak for Keith, but I'd really love to see this going = forward! >>>>> =C2=A0 >>>>> Same! This is a great problem to solve, but I'm just sorry I don't ha= ve >>>>> more cycles to work on the cause. I can quickly respin the msix noflu= sh >>>>> pre-patches to address the naming issues tglx mentioned, and we can t= ake >>>>> nvme in whichever direction has the best performance. >>>>> =C2=A0 >>>> >>>> That sounds good. >>>> I'm currently working on continuously optimizing and testing both >>>> approaches (using DIM and not using DIM).=C2=A0 >>>> 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-19BwaInSx53HwOdRP= JFrZ-Hjlk0_Y/edit?gid=3D300100#gid=3D300100 >>> >>> [2] DIM version: >>> https://docs.google.com/spreadsheets/d/18JADnBXWAGkffY_3LsPJ6ftA9DGH6qp= NbKvP-lQWLnE/edit?gid=3D300200#gid=3D300200 >>> >>> 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 pollin= g >>> trial must improve the completion rate by more than 1%. Once successful= , >>> polling can continue while its rate stays within roughly 1% of the save= d >>> 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 vali= d >>> 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=E2=80=99s simpler, easier to understand, and e= asier >>> to maintain. >>> >>> Which approach would you prefer? >>> >>> >>> All the patches are in the attachment. > ---end quoted text---