From: sashiko-bot@kernel.org
To: "Anisa Su" <anisa.su887@gmail.com>, linux-cxl@vger.kernel.org
Cc: nvdimm@lists.linux.dev
Subject: Re: [PATCH v1 05/14] cxl/mem: Add 20 second timeout for stalled DC event chains
Date: Wed, 04 Nov 2026 23:13:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-198277@kernel.org> (raw)
In-Reply-To: <20261104230445.66625-6-anisa.su@samsung.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] cxl/mem: handle_dcd_chain_event() queues work on deprecated system_wq
--
commit ffea09425b5b7122c1c8acbc05e99f66a63015a7
Author: Anisa Su <anisa.su887@gmail.com>
cxl/mem: Add 20 second timeout for stalled DC event chains
This commit adds a 20-second delayed-work watchdog to abort Dynamic Capacity
event chains when a device opens a chain with CXL_DCD_EVENT_MORE set but
never sends the closing record. On timeout, an add capacity chain is refused
with an empty response while a release capacity chain is cleared for retry.
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index 3acf5ace48dbc..fea910e6c5108 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
[ ... ]
> @@ -1279,9 +1343,22 @@ static int handle_dcd_chain_event(struct cxl_memdev_state *mds,
>
> if (event->flags & CXL_DCD_EVENT_MORE) {
> dev_dbg(dev, "more bit set; delay processing of extent\n");
> + /* The deadline is fixed when the chain opens, not per record */
> + if (!chain->armed) {
> + queue_delayed_work(system_wq, &chain->timeout_work,
> + CXL_DC_CHAIN_TIMEOUT);
> + chain->armed = true;
> + }
[Severity: Low]
When a Dynamic Capacity event record arrives with CXL_DCD_EVENT_MORE set,
handle_dcd_chain_event() queues chain->timeout_work onto system_wq.
In include/linux/workqueue.h, system_wq is marked deprecated in favor of
system_percpu_wq:
extern struct workqueue_struct *system_wq; /* use system_percpu_wq, this will be removed */
extern struct workqueue_struct *system_percpu_wq;
Because system_wq is allocated with __WQ_DEPRECATED, when the 20-second timer
expires and delayed_work_timer_fn() dispatches the work via __queue_work(),
it triggers a runtime deprecation warning:
if (unlikely(wq->flags & __WQ_DEPRECATED))
pr_warn_once("workqueue: work func %ps enqueued on deprecated workqueue. "
"Use system_{percpu|dfl}_wq instead.\n",
work->func);
Should handle_dcd_chain_event() use schedule_delayed_work() or
system_percpu_wq instead of system_wq?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104230445.66625-1-anisa.su@samsung.com?part=5
next prev parent reply other threads:[~2026-11-04 23:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 23:02 [PATCH v1 00/14] DCD CXL Series: Dynamic Capacity extent handling Anisa Su
2026-11-04 23:02 ` [PATCH v1 01/14] cxl/core: Return endpoint decoder information from region search Anisa Su
2026-11-04 23:02 ` [PATCH v1 02/14] cxl/port: Add dynamic capacity options to endpoint decoder mode Anisa Su
2026-11-04 23:02 ` [PATCH v1 03/14] cxl/region: Add dynamic DAX region support Anisa Su
2026-11-04 23:21 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 04/14] cxl/mem: Introduce DC event handlers Anisa Su
2026-11-04 23:18 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 05/14] cxl/mem: Add 20 second timeout for stalled DC event chains Anisa Su
2026-11-04 23:13 ` sashiko-bot [this message]
2026-11-04 23:02 ` [PATCH v1 06/14] cxl/extent: Handle DC Add Capacity events Anisa Su
2026-11-04 23:34 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 07/14] cxl/mem: Drop misaligned DCD extent groups Anisa Su
2026-11-04 23:02 ` [PATCH v1 08/14] cxl/extent: Validate DC extent partition Anisa Su
2026-11-04 23:02 ` [PATCH v1 09/14] cxl/mem: Enforce tag-group semantics Anisa Su
2026-11-04 23:02 ` [PATCH v1 10/14] cxl/extent: Enforce cross-region tag uniqueness Anisa Su
2026-11-04 23:17 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 11/14] cxl/extent: Handle DC Release Capacity events Anisa Su
2026-11-04 23:28 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 12/14] cxl/region: Read existing extents on region creation Anisa Su
2026-11-04 23:36 ` sashiko-bot
2026-11-04 23:02 ` [PATCH v1 13/14] cxl/mem: Trace Dynamic capacity Event Record Anisa Su
2026-11-04 23:02 ` [PATCH v1 14/14] Documentation/cxl: Document DCD extent handling Anisa Su
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-198277@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=anisa.su887@gmail.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox