From: Matthew Brost <matthew.brost@intel.com>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: <linux-kernel@vger.kernel.org>, <intel-xe@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.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>,
Lucas De Marchi <lucas.demarchi@intel.com>,
"Thomas Hellstrom" <thomas.hellstrom@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Subject: Re: [PATCH] drm/xe: Replace use of system_wq with system_percpu_wq
Date: Wed, 24 Dec 2025 10:28:10 -0800 [thread overview]
Message-ID: <aUwwunqiFw3YdKUo@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251224160026.124106-1-marco.crivellari@suse.com>
On Wed, Dec 24, 2025 at 05:00:26PM +0100, Marco Crivellari wrote:
> This patch continues the effort to refactor workqueue APIs, which has begun
> with the changes 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")
>
> The point of the refactoring is to eventually alter the default behavior of
> workqueues to become unbound by default so that their workload placement is
> optimized by the scheduler.
>
> Before that to happen after a careful review and conversion of each individual
> case, workqueue users must be converted to the better named new workqueues with
> no intended behaviour changes:
>
> system_wq -> system_percpu_wq
> system_unbound_wq -> system_dfl_wq
>
> This way the old obsolete workqueues (system_wq, system_unbound_wq) can be
> removed in the future.
>
> Suggested-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
> ---
> drivers/gpu/drm/xe/xe_tlb_inval.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_tlb_inval.c b/drivers/gpu/drm/xe/xe_tlb_inval.c
> index 918a59e686ea..b2cf6e17fbc5 100644
> --- a/drivers/gpu/drm/xe/xe_tlb_inval.c
> +++ b/drivers/gpu/drm/xe/xe_tlb_inval.c
> @@ -94,7 +94,7 @@ static void xe_tlb_inval_fence_timeout(struct work_struct *work)
> xe_tlb_inval_fence_signal(fence);
> }
> if (!list_empty(&tlb_inval->pending_fences))
> - queue_delayed_work(system_wq, &tlb_inval->fence_tdr,
> + queue_delayed_work(system_percpu_wq, &tlb_inval->fence_tdr,
Actually system_wq or system_percpu_wq doesn't work here as this is the
fence signaling path. We should use one Xe's ordered work queues which
is properly setup to be reclaim same.
Matt
> timeout_delay);
> spin_unlock_irq(&tlb_inval->pending_lock);
> }
> @@ -226,7 +226,7 @@ static void xe_tlb_inval_fence_prep(struct xe_tlb_inval_fence *fence)
> list_add_tail(&fence->link, &tlb_inval->pending_fences);
>
> if (list_is_singular(&tlb_inval->pending_fences))
> - queue_delayed_work(system_wq, &tlb_inval->fence_tdr,
> + queue_delayed_work(system_percpu_wq, &tlb_inval->fence_tdr,
> tlb_inval->ops->timeout_delay(tlb_inval));
> spin_unlock_irq(&tlb_inval->pending_lock);
>
> @@ -378,7 +378,7 @@ void xe_tlb_inval_done_handler(struct xe_tlb_inval *tlb_inval, int seqno)
> }
>
> if (!list_empty(&tlb_inval->pending_fences))
> - mod_delayed_work(system_wq,
> + mod_delayed_work(system_percpu_wq,
> &tlb_inval->fence_tdr,
> tlb_inval->ops->timeout_delay(tlb_inval));
> else
> --
> 2.52.0
>
next prev parent reply other threads:[~2025-12-24 18:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-24 16:00 Marco Crivellari
2025-12-24 18:28 ` Matthew Brost [this message]
2025-12-30 15:42 ` Marco Crivellari
2025-12-31 2:25 ` Matthew Brost
2026-01-07 9:04 ` 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=aUwwunqiFw3YdKUo@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=airlied@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=frederic@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.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
all inboxes | Powered by JetHome®