From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEBA83D8907 for ; Thu, 9 Jul 2026 09:06:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783587977; cv=none; b=BVr/KrJlS+taU8rWyditztNo9SrMpS0IvXM7Dh+6PjDpb7eC9KI/ldQIqI49Z5+JglXeBFJ4+DXij9iobOuA2d/ywH1GXADdtkrmNJ/W6xeDeoudhSjNsVv7cU5CBhwQ3/ULm7EjUfYGWk3xdiHhKdkFqekS3V5yjk4kh6SkJC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783587977; c=relaxed/simple; bh=dTl2MkKWYlOVltQj56RJclG2XBK1tIVnXumHT/8/0zQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dFRx8i44i3W7G6F64fFbJnGaf2GlNzw/t15HJK2aeRCc6JDuGruCs3uUuUFtADqMfZpY/ywL04SwTputN9cgo2xTj1pk6JnCZNnG470hEtqkB+UT5ttRLEtYQx8pmUc+FU4LMYB7te0t3dk03mBtx3D5U1KOqjL5QpxanBNnT/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HrXcuXay; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HrXcuXay" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-383adaa461fso1092732a91.3 for ; Thu, 09 Jul 2026 02:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783587975; x=1784192775; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=niqcxvxx9mjN5W6h/lURJAP03sAdP9CJ4GgRbGY87SM=; b=HrXcuXayUMGk8d3hSaBcQjJShUudhVjqjArLyGtwFowsBYZ+0HscbqYDmL9+zujaJg ubR0yBb1mLdEFa+cmy6qNq93HEOmQKZBafcx+PZlw2/gDyZRgdKRgU3sE9N3xbJTuhD5 xrl/St2oVamkuBYk5xcOoCrDHohVNmu0eXEJgcAD4Kkiv52QeM2gqubHYlIDYTxMO/IL WBHO/rs799GJrWS3inZfi4odeDZkHgI1aMaqQoD/080tC0vAmDedQ/IC4vgHuTODhxvd KOcImzYvALrfbkD8Ov9V72hI8fd0AH4JUCJJPkwc6iNvwu9iAeHCtfaQ9aEmQV4XW8Pe ET6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783587975; x=1784192775; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=niqcxvxx9mjN5W6h/lURJAP03sAdP9CJ4GgRbGY87SM=; b=Fj5T5lUbEBDo/CRGxUbfN67Tza45hxtMyfgXkwP60DCjHWsAOzYGxohug4RyKV9NIH j5SILdzaGQ+Uqq3Qhds22JtRtC+HyJxwHPlnz5M38ktDGPLdpxL2892Afm9ogGyFuJ83 l/PZypXYih/j4FO6Bk3SoV9+q06kirc3wnFrPjMha7lQCFMUMbyc2C7jNqp+SZB6A/Kv 6qih5U4DUELyLOGZjneBcJKqNnNH1qFli9lfNVCMCfcrtGAUU/LbsAKMIGRu0khORQQD FVFr8fcO7JpsQ5/nx/MwWQnq8ZUz+glpsW4x/rWPXWmcQ873+IDl4yH2Gw1ZorIwtwH3 i3+A== X-Forwarded-Encrypted: i=1; AHgh+RrLMLEKUu4PLf3SlbeTJ0HZKCFQwONd+nLhC/ymC9doJxxRbflF2euPqUW5ZBk+rRnPZziDzr3dZZ+hJs0=@vger.kernel.org X-Gm-Message-State: AOJu0YzB2zYrm+u4Kdk4yu2mPBRBfT1lrRimPPJvdbD/tHNoikaFVgTG yPixMNiSXmVL+IWIdL8Kf0FmvRCkP77A/L8f3vJzfAAs+M8Q1KdNLCDV X-Gm-Gg: AfdE7cn2vEQyzqOIzorCxx8vXVyTF9LCaqfVXyc0qmqednx8vIgE2Hu9mWuNOt426g+ IQCO3/vT2Ite6+gVhQ7O5W7V+xGBCz0680XEMRJhtghGfiw217xWlpqvo0ND0O5L+mFhhEO+Qnx uU3oiFrNJHhIwhTZZUrtyIpH/taBik6n92yTWYD7oPPFNli+i7Sqn/AMBQgs7BrYw1Yv7+6X55k FbUzbUf8rDbvwJdr6y3OuQFs6TH+GV5H8bAWJ8SL+pTBRCtfPbk1Gn4eeJPuy5RhO84ka7+BjrU tgEpj73HcIDOBCWrric/ZIPTIhaTRg8+oR9PXPWx7fkznJG/vNfVyMSw2/ZFzYdCbaf64jqlinv wIRX5ndA5bjAzVNQ9gLGfTwDhTU5sAKXXbeGH38g0rpJCOyof1CUqy2ypVXIgmi8N/Rmro6Kzmt j7SzzowS7n6knxA+ZvWvJwg0C/vpnvG7Jn10O/bXqX X-Received: by 2002:a17:90a:e70d:b0:37f:9cdf:f03a with SMTP id 98e67ed59e1d1-38941fb57e3mr6283355a91.29.1783587975008; Thu, 09 Jul 2026 02:06:15 -0700 (PDT) Received: from [10.0.48.76] ([61.213.176.7]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38a583a22f8sm825313a91.15.2026.07.09.02.06.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jul 2026 02:06:14 -0700 (PDT) Message-ID: <7ae65361-f601-4fd9-8eac-5dfb9f6bb7ea@gmail.com> Date: Thu, 9 Jul 2026 17:06:11 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvme: make firmware activation poll interval configurable To: Christoph Hellwig Cc: kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Guzebing References: <20260627010610.47768-1-guzebing1612@gmail.com> <20260709064233.GA18381@lst.de> From: guzebing In-Reply-To: <20260709064233.GA18381@lst.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/9/26 2:42 PM, Christoph Hellwig wrote: > On Sat, Jun 27, 2026 at 09:06:10AM +0800, guzebing wrote: >> From: Guzebing >> >> nvme_fw_act_work() polls the controller processing-paused status every >> 100 ms while firmware activation is pending. Some devices can complete >> online activation in only a few hundred milliseconds, so the fixed >> interval can add noticeable latency before the driver observes >> completion. >> >> Add an nvme_core.fw_act_poll_interval_ms module parameter to make the >> poll interval tunable. Keep the default at 100 ms to preserve existing >> behavior, and accept values from 10 ms to 100 ms so systems that need >> faster completion detection can opt in to a shorter interval. >> >> Signed-off-by: Guzebing >> --- >> We recently observed this issue while performing online firmware >> updates for Gen5 NVMe SSDs in a production environment. >> >> During firmware activation, the kernel quiesces I/O. Detecting the end >> of firmware activation earlier lets the driver unquiesce I/O earlier, >> which is important for the long-tail I/O latency of production >> workloads. > > What value does this device report in the Maximum Time for Firmware > Activation (MTFA) field? It might make sense to scale the polling > time as a fraction of that instead of requiring a manual override. > The Samsung PM9D3a Gen5 SSD reports MTFA = 10, i.e. 1000 ms. I also checked another device, an Intel/Solidigm P5520 Gen4 drive. It reports MTFA = 100, i.e. 10000 ms, while the observed online activation time is about 800 ms. I agree that deriving the polling interval from MTFA would be better than adding a module parameter. Given that MTFA is a conservative upper bound rather than a good estimate of the common activation time, would using a small fraction of it, for example MTFA / 100 clamped to 10..100 ms, be a reasonable policy for v2? That would give 10 ms for the PM9D3a device above, while keeping the current 100 ms interval for the P5520 case and for large-MTFA devices.