From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Stuart Summers <stuart.summers@intel.com>
Cc: <matthew.brost@intel.com>, <John.C.Harrison@intel.com>,
<brian.welty@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/xe: Fix missing workqueue destroy in xe_gt_pagefault
Date: Tue, 9 Jul 2024 14:59:41 -0400 [thread overview]
Message-ID: <Zo2IneFVE2yZ8B6Q@intel.com> (raw)
In-Reply-To: <7c8bf0c59c0bd167c238dc5a65d0074a4ea4109d.1720550129.git.stuart.summers@intel.com>
On Tue, Jul 09, 2024 at 06:40:59PM +0000, Stuart Summers wrote:
> On driver reload we never free up the memory for the pagefault and
> access counter workqueues. Add those destroy calls here.
>
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_pagefault.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> index e18659201208..ded8e3c33a82 100644
> --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> @@ -398,6 +398,18 @@ static void pf_queue_work_func(struct work_struct *w)
>
> static void acc_queue_work_func(struct work_struct *w);
>
> +static void pagefault_fini(void *arg)
> +{
> + struct xe_gt *gt = arg;
> + struct xe_device *xe = gt_to_xe(gt);
> +
> + if (!xe->info.has_usm)
> + return;
> +
> + destroy_workqueue(gt->usm.acc_wq);
> + destroy_workqueue(gt->usm.pf_wq);
> +}
> +
> int xe_gt_pagefault_init(struct xe_gt *gt)
> {
> struct xe_device *xe = gt_to_xe(gt);
> @@ -428,7 +440,7 @@ int xe_gt_pagefault_init(struct xe_gt *gt)
> if (!gt->usm.acc_wq)
> return -ENOMEM;
I believe we should destroy the pf_wq in this return, no?!
with that fixed or clarified,
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> - return 0;
> + return devm_add_action_or_reset(xe->drm.dev, pagefault_fini, gt);
> }
>
> void xe_gt_pagefault_reset(struct xe_gt *gt)
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-07-09 19:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 18:40 [PATCH 0/2] Update page fault queue size calculation Stuart Summers
2024-07-09 18:40 ` [PATCH 1/2] drm/xe: Fix missing workqueue destroy in xe_gt_pagefault Stuart Summers
2024-07-09 18:59 ` Rodrigo Vivi [this message]
2024-07-09 20:48 ` Matthew Brost
2024-07-09 22:54 ` Summers, Stuart
2024-07-09 18:41 ` [PATCH 2/2] drm/xe: Use topology to determine page fault queue size Stuart Summers
2024-07-09 20:52 ` Matthew Brost
2024-07-09 22:53 ` Summers, Stuart
2024-07-11 17:26 ` Summers, Stuart
2024-07-09 18:48 ` ✓ CI.Patch_applied: success for Update page fault queue size calculation Patchwork
2024-07-09 18:48 ` ✓ CI.checkpatch: " Patchwork
2024-07-09 18:49 ` ✓ CI.KUnit: " Patchwork
2024-07-09 19:01 ` ✓ CI.Build: " Patchwork
2024-07-09 19:03 ` ✗ CI.Hooks: failure " Patchwork
2024-07-09 19:05 ` ✓ CI.checksparse: success " Patchwork
2024-07-09 19:39 ` ✓ CI.BAT: " Patchwork
2024-07-09 21:40 ` ✓ CI.FULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-11 17:36 [PATCH 0/2] " Stuart Summers
2024-07-11 17:36 ` [PATCH 1/2] drm/xe: Fix missing workqueue destroy in xe_gt_pagefault Stuart Summers
2024-06-10 20:32 Stuart Summers
2024-06-10 22:36 ` Matthew Brost
2024-06-25 17:17 ` Summers, Stuart
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=Zo2IneFVE2yZ8B6Q@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=John.C.Harrison@intel.com \
--cc=brian.welty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=stuart.summers@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).