From: Jonathan Cameron <jic23@kernel.org>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michal Hocko <mhocko@suse.com>,
Marius Cristea <marius.cristea@microchip.com>
Subject: Re: [PATCH] iio/adc/pac1934: replace use of system_wq with system_percpu_wq
Date: Sun, 9 Nov 2025 16:45:36 +0000 [thread overview]
Message-ID: <20251109164536.2ed7867d@jic23-huawei> (raw)
In-Reply-To: <20251105104330.111057-1-marco.crivellari@suse.com>
On Wed, 5 Nov 2025 11:43:30 +0100
Marco Crivellari <marco.crivellari@suse.com> wrote:
> Currently if a user enqueues a work item using schedule_delayed_work() the
> used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
> WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
> schedule_work() that is using system_wq and queue_work(), that makes use
> again of WORK_CPU_UNBOUND.
>
> This lack of consistency cannot be addressed without refactoring the API.
>
> This patch continues the effort to refactor worqueue APIs, which has begun
> with the change introducing new workqueues and a new alloc_workqueue flag:
>
> commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
> commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")
>
> system_percpu_wq replaced system_wq, so change the wq in iio/adc/pac1934.
>
> The old wq (system_wq) will be kept for a few release cycles.
>
> Suggested-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
I'd start these descriptions off by saying the system_wq is deprecated.
Then people are already on the page for there being a necessity to make
a change.
Anyhow, I've seen enough of the discussion of other related patches to
be fine with this.
Applied.
> ---
> drivers/iio/adc/pac1934.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/pac1934.c b/drivers/iio/adc/pac1934.c
> index 48df16509260..ec96bb0f2ed6 100644
> --- a/drivers/iio/adc/pac1934.c
> +++ b/drivers/iio/adc/pac1934.c
> @@ -768,7 +768,7 @@ static int pac1934_retrieve_data(struct pac1934_chip_info *info,
> * Re-schedule the work for the read registers on timeout
> * (to prevent chip registers saturation)
> */
> - mod_delayed_work(system_wq, &info->work_chip_rfsh,
> + mod_delayed_work(system_percpu_wq, &info->work_chip_rfsh,
> msecs_to_jiffies(PAC1934_MAX_RFSH_LIMIT_MS));
> }
>
next prev parent reply other threads:[~2025-11-09 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 10:43 [PATCH] iio/adc/pac1934: replace use of system_wq with system_percpu_wq Marco Crivellari
2025-11-09 16:45 ` Jonathan Cameron [this message]
2025-11-10 9:45 ` Marco Crivellari
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=20251109164536.2ed7867d@jic23-huawei \
--to=jic23@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=marius.cristea@microchip.com \
--cc=mhocko@suse.com \
--cc=tj@kernel.org \
/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