From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>, Suyash Mahar <smahar@meta.com>,
Yeoreum Yun <yeoreum.yun@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Qi Liu <liuqi115@huawei.com>, Junhao He <hejunhao3@huawei.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
sashiko-bot <sashiko-bot@kernel.org>
Subject: Re: [PATCH v3 3/8] coresight: etm-perf: Flush workqueue before unloading module
Date: Thu, 13 Aug 2026 15:19:57 +0100 [thread overview]
Message-ID: <20260813141957.GB8904@e132581.arm.com> (raw)
In-Reply-To: <20260728-james-cs-multiple-per-threads-v3-3-6aee7579f1dc@linaro.org>
On Tue, Jul 28, 2026 at 04:00:15PM +0100, James Clark wrote:
> The work queue is never flushed on module unload, so pending work items
> can run after coresight-config is cleaned up or the .text section is
> unloaded. The global workqueue also can't be flushed manually, so change
> it to a local workqueue and flush it on exit.
Why can't we drop the workqueue if it introduces race conditions and
complexity? In particular, I don't see much benefit from deferring
the resource release.
According to the comment in __rb_free_aux(), the free_aux() callback
should never be called from atomic context. It should be safe to release
the resources directly from the free_aux() callback, without going
through a workqueue.
Thanks,
Leo
next prev parent reply other threads:[~2026-08-13 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 15:00 [PATCH v3 0/8] coresight: Prevent per-thread events from sharing a sink James Clark
2026-07-28 15:00 ` [PATCH v3 1/8] coresight: tmc-etr: Don't stop Perf cleanup for active sysfs reads James Clark
2026-08-12 16:45 ` Leo Yan
2026-08-13 9:02 ` James Clark
2026-07-28 15:00 ` [PATCH v3 2/8] coresight: configfs: Don't assume active until cscfg_mgr is set James Clark
2026-08-13 9:09 ` Leo Yan
2026-08-13 9:24 ` James Clark
2026-07-28 15:00 ` [PATCH v3 3/8] coresight: etm-perf: Flush workqueue before unloading module James Clark
2026-08-13 14:19 ` Leo Yan [this message]
2026-07-28 15:00 ` [PATCH v3 4/8] coresight: tmc-etr: Prevent per-thread events from sharing a sink James Clark
2026-08-13 16:05 ` Leo Yan
2026-07-28 15:00 ` [PATCH v3 5/8] coresight: tmc-etr: Use session ID for buffer ownership James Clark
2026-07-28 15:00 ` [PATCH v3 6/8] coresight: tmc-etf: Prevent per-thread events from sharing a sink James Clark
2026-07-28 15:00 ` [PATCH v3 7/8] coresight: etb10: " James Clark
2026-07-28 15:00 ` [PATCH v3 8/8] coresight: ultrasoc-smb: " James Clark
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=20260813141957.GB8904@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=coresight@lists.linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hejunhao3@huawei.com \
--cc=james.clark@linaro.org \
--cc=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuqi115@huawei.com \
--cc=mike.leach@arm.com \
--cc=sashiko-bot@kernel.org \
--cc=smahar@meta.com \
--cc=suzuki.poulose@arm.com \
--cc=yeoreum.yun@arm.com \
/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