From: "Summers, Stuart" <stuart.summers@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Brost, Matthew" <matthew.brost@intel.com>
Cc: "maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [PATCH v2 4/9] drm/xe: Create ordered workqueue for GT TLB invalidation jobs
Date: Thu, 17 Jul 2025 19:55:21 +0000 [thread overview]
Message-ID: <87aa32cb0f684bddec35bd1d33e4765fe0bca173.camel@intel.com> (raw)
In-Reply-To: <20250702234222.3278264-5-matthew.brost@intel.com>
On Wed, 2025-07-02 at 16:42 -0700, Matthew Brost wrote:
> No sense to schedule GT TLB invalidation jobs in parallel which
> target
> the same given these all contend on the same lock, create ordered
This was supposed to be "in parallel which target the same exec queue"?
> workqueue for GT TLB invalidation jobs.
>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
I still think we should be including these patches with patches that
actually use what is implemented here generally, but not a huge deal
here. This is pretty straight forward and already used in the
subsequent patches in the series.
Verified also the drmm_alloc_ordered_workqueue is auto destroyed on the
drm dev put.
Other than the minor commit message confusion above:
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 8 ++++++++
> drivers/gpu/drm/xe/xe_gt_types.h | 2 ++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> index 6088df8e159c..f6f32600e8a5 100644
> --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> @@ -3,6 +3,8 @@
> * Copyright © 2023 Intel Corporation
> */
>
> +#include <drm/drm_managed.h>
> +
> #include "xe_gt_tlb_invalidation.h"
>
> #include "abi/guc_actions_abi.h"
> @@ -123,6 +125,12 @@ int xe_gt_tlb_invalidation_init_early(struct
> xe_gt *gt)
> INIT_DELAYED_WORK(>->tlb_invalidation.fence_tdr,
> xe_gt_tlb_fence_timeout);
>
> + gt->tlb_invalidation.job_wq =
> + drmm_alloc_ordered_workqueue(>_to_xe(gt)->drm, "gt-
> tbl-inval-job-wq",
> + WQ_MEM_RECLAIM);
> + if (IS_ERR(gt->tlb_invalidation.job_wq))
> + return PTR_ERR(gt->tlb_invalidation.job_wq);
> +
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_types.h
> b/drivers/gpu/drm/xe/xe_gt_types.h
> index 96344c604726..dfd4a16da5f0 100644
> --- a/drivers/gpu/drm/xe/xe_gt_types.h
> +++ b/drivers/gpu/drm/xe/xe_gt_types.h
> @@ -210,6 +210,8 @@ struct xe_gt {
> * xe_gt_tlb_fence_timeout after the timeut interval
> is over.
> */
> struct delayed_work fence_tdr;
> + /** @wtlb_invalidation.wq: schedules GT TLB
> invalidation jobs */
> + struct workqueue_struct *job_wq;
> /** @tlb_invalidation.lock: protects TLB invalidation
> fences */
> spinlock_t lock;
> } tlb_invalidation;
next prev parent reply other threads:[~2025-07-17 19:55 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 23:42 [PATCH v2 0/9] Use DRM scheduler for delayed GT TLB invalidations Matthew Brost
2025-07-02 23:42 ` [PATCH v2 1/9] drm/xe: Explicitly mark migration queues with flag Matthew Brost
2025-07-10 8:43 ` Francois Dugast
2025-07-11 21:20 ` Summers, Stuart
2025-07-02 23:42 ` [PATCH v2 2/9] drm/xe: Add generic dependecy jobs / scheduler Matthew Brost
2025-07-10 11:51 ` Francois Dugast
2025-07-10 17:38 ` Matthew Brost
2025-07-15 21:04 ` Summers, Stuart
2025-07-15 21:14 ` Matthew Brost
2025-07-15 21:13 ` Summers, Stuart
2025-07-15 22:43 ` Summers, Stuart
2025-07-15 22:48 ` Matthew Brost
2025-07-02 23:42 ` [PATCH v2 3/9] drm: Simplify drmm_alloc_ordered_workqueue return Matthew Brost
2025-07-16 1:10 ` Matthew Brost
2025-07-02 23:42 ` [PATCH v2 4/9] drm/xe: Create ordered workqueue for GT TLB invalidation jobs Matthew Brost
2025-07-17 19:55 ` Summers, Stuart [this message]
2025-07-17 19:59 ` Matthew Brost
2025-07-02 23:42 ` [PATCH v2 5/9] drm/xe: Add dependency scheduler for GT TLB invalidations to bind queues Matthew Brost
2025-07-15 21:34 ` Summers, Stuart
2025-07-15 21:44 ` Matthew Brost
2025-07-15 21:45 ` Summers, Stuart
2025-07-15 21:52 ` Matthew Brost
2025-07-15 21:53 ` Summers, Stuart
2025-07-15 22:01 ` Matthew Brost
2025-07-15 22:49 ` Summers, Stuart
2025-07-02 23:42 ` [PATCH v2 6/9] drm/xe: Add xe_migrate_job_lock/unlock helpers Matthew Brost
2025-07-15 22:48 ` Summers, Stuart
2025-07-16 1:11 ` Matthew Brost
2025-07-02 23:42 ` [PATCH v2 7/9] drm/xe: Add GT TLB invalidation jobs Matthew Brost
2025-07-15 23:09 ` Summers, Stuart
2025-07-16 1:08 ` Matthew Brost
2025-07-17 15:58 ` Summers, Stuart
2025-07-02 23:42 ` [PATCH v2 8/9] drm/xe: Use GT TLB invalidation jobs in PT layer Matthew Brost
2025-07-17 21:00 ` Summers, Stuart
2025-07-17 21:07 ` Matthew Brost
2025-07-17 22:26 ` Summers, Stuart
2025-07-17 22:35 ` Matthew Brost
2025-07-17 22:36 ` Summers, Stuart
2025-07-02 23:42 ` [PATCH v2 9/9] drm/xe: Remove unused GT TLB invalidation trace points Matthew Brost
2025-07-11 21:13 ` Summers, Stuart
2025-07-03 0:45 ` ✗ CI.checkpatch: warning for Use DRM scheduler for delayed GT TLB invalidations (rev2) Patchwork
2025-07-03 0:46 ` ✓ CI.KUnit: success " Patchwork
2025-07-03 1:00 ` ✗ CI.checksparse: warning " Patchwork
2025-07-03 1:32 ` ✓ Xe.CI.BAT: success " Patchwork
2025-07-04 18:11 ` ✗ Xe.CI.Full: failure " Patchwork
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=87aa32cb0f684bddec35bd1d33e4765fe0bca173.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.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;
as well as URLs for NNTP newsgroup(s).