Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.83.209.80 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796226285; b=2YpP+BVFeQiSx4j/m+MIy1XkmW0p+xqvPpmpgD1ylRq2re5sQRIsWynNleQllkuSasut U1mK7M8Qhzk8nC2goWiT3EseWWMswOWbzCEu4s+LZfzbU1hwHVFFFzkTU6lny095fcNHT 1rbyJTjQWnAgWiOQIWpt2iYTiT2rZMNqRDi6O15hG0Z7xyJ18bfliiFugkfE4VgPLZwxh wcSWKWWEdHbsVD1GocNjpgC/qkO8E7ffyT7CxoqO43M+EN8GXDuAj2hNTYU/1K4OtX+gd 31egRSVpA3f3yTn1jyM01BfnWFTVM60bHup0MAJEadfuJBi+tTVl0tI7W6gubQYwzNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796226285; h=DMARC-Filter:X-Sender-Id:Received:Received:X-Sender-Id:X-MC-Relay: X-MailChannels-SenderId:X-MailChannels-Auth-Id:X-Snatch-Lyrical: X-MC-Loop-Signature:X-MC-Ingress-Time:Received:Received: DKIM-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=OVeIRa42McvRraBAOvLyN9Ds/nwjcRlpsFrg5Qmg0d4=; b=WK8lpAhR29Mu0khQe2++a4CU5iWkJ5JGnkj41GtfYV2FAYPsVFaQQQ1YE4AvfVi9zqfo wUk3Rwa27cT7DiAr/2P+spT5DV6aTKVJP0A1Cnbx12ggOhhNHphn24tHXhG4pr7v5Ppir KzRyfarVE/DGVriMyEPXJJMEyXQp49pRGNHhMUT4+j84O28IlOBLM5AcsQkjIoRy+/JSa c7y1zYBxfmyfjd/z9mv3gZwHipQ8PcSxxsD3bl9rfJGAUsYCNzsqxEz6KB1+krKCq0CK0 jF+xYzf7C5cl2rKdAV1u1Eha/VavqrEaiSzLc99XhaiCpyoWNM/kwkodXGefTZWrT5g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stgolabs.net; spf=fail smtp.mailfrom=stgolabs.net; dkim=pass header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=UwCrzLuO; arc=none smtp.remote-ip=23.83.209.80 Received: from hamster.birch.relay.mailchannels.net (hamster.birch.relay.mailchannels.net [23.83.209.80]) (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 28376606A31A for ; Wed, 2 Dec 2026 15:44:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 28376606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=UwCrzLuO X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AEB37161F63; Wed, 02 Dec 2026 15:44:38 +0000 (UTC) Received: from pdx1-sub0-mail-a229.dreamhost.com (100-96-7-119.trex-nlb.outbound.svc.cluster.local [100.96.7.119]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5865216214C; Wed, 02 Dec 2026 15:44:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Snatch-Lyrical: 0dbb633651fe8fc8_1796226278620_1216046376 X-MC-Loop-Signature: 1796226278620:2422404644 X-MC-Ingress-Time: 1796226278620 Received: from pdx1-sub0-mail-a229.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.7.119 (trex/8.0.2); Wed, 02 Dec 2026 15:44:38 +0000 Received: from offworld.tailf5af7a.ts.net (unknown [76.167.199.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a229.dreamhost.com (Postfix) with ESMTPSA id 4jfhrx4mDKzQ1; Wed, 2 Dec 2026 07:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1796226274; bh=OVeIRa42McvRraBAOvLyN9Ds/nwjcRlpsFrg5Qmg0d4=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=UwCrzLuOysCY3UWBWUvoNxdMjcY+ZTugoK/pEH3aBaT2fopy19dtYAm4JPFWuuhng WkmkhXse5jhoGBYQd1J5H7xFobaZJCyaa1Bd4Zzk3lHZFT2b/hMajE9fy39TnCq1dA VAwEbkWlkIf5tdrAVtxwl/2AegNn3OpdWDnb0V5/6LP/P0pyTnoyum0V68dqirwBoe 9pgYlBOy77JHEbD8qUnGiPVmjRqkU24GqJcdfoPa8jUxFKa/zl1/U+Qg7u07OgflNK Dj2cjtuvbCw/eoTrqjr7koRm7IoM2/rnqgaSMHTKQXobAkAo27aHQitrFh2ku/OmdF tTpt/B1WxGDQg== From: Davidlohr Bueso To: dave.jiang@intel.com Cc: jic23@kernel.org, alison.schofield@intel.com, ming.li@zohomail.com, icheng@nvidia.com, benjamin.cheatham@amd.com, unsung0317@gmail.com, linux-cxl@vger.kernel.org, dave@stgolabs.net Subject: [PATCH v2 01/10] cxl/pci: Reschedule the poller with the capped timeout Date: Wed, 2 Dec 2026 07:43:55 -0800 Message-Id: <20261202154404.4016305-2-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20261202154404.4016305-1-dave@stgolabs.net> References: <20261202154404.4016305-1-dave@stgolabs.net> X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit cxl_mbox_sanitize_work() backs off by 10 seconds every time it finds the sanitize still running, up to 15 minutes. The cap is only applied to the stored poll_tmo_secs however, while the work is rescheduled with the uncapped value. Once the limit is reached the poller runs every 910 seconds instead. Compute the capped value first, and use it for both. Fixes: 0c36b6ad436a ("cxl/mbox: Add sanitization handling machinery") Signed-off-by: Davidlohr Bueso --- drivers/cxl/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 8ce58917c32d..96c1e3381961 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -166,9 +166,9 @@ static void cxl_mbox_sanitize_work(struct work_struct *work) dev_dbg(cxlds->dev, "Sanitization operation ended\n"); } else { - int timeout = mds->security.poll_tmo_secs + 10; + int timeout = min(15 * 60, mds->security.poll_tmo_secs + 10); - mds->security.poll_tmo_secs = min(15 * 60, timeout); + mds->security.poll_tmo_secs = timeout; schedule_delayed_work(&mds->security.poll_dwork, timeout * HZ); } mutex_unlock(&cxl_mbox->mbox_mutex); -- 2.39.5