From: John Harrison <john.c.harrison@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <rodrigo.vivi@intel.com>,
<matthew.brost@intel.com>, <matthew.auld@intel.com>
Subject: Re: [PATCH 3/3] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout
Date: Wed, 9 Oct 2024 12:50:29 -0700 [thread overview]
Message-ID: <65cf53a0-1696-44bb-8606-83f867b7c545@intel.com> (raw)
In-Reply-To: <20241009105645.1416588-4-badal.nilawar@intel.com>
On 10/9/2024 03:56, Badal Nilawar wrote:
> In case if g2h worker doesn't get opportunity to within specified
'to run'?
> timeout delay then flush the g2h worker explicitly.
>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1620
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2902
> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_ct.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index dcc95c01b6f0..2e2fa59eadfb 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -1034,6 +1034,18 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
> }
> mutex_unlock(&ct->lock);
>
> + /*
> + * Flush g2h_worker explicitly in case if it didn't get opportunity
> + * to run after it is queued
> + */
> + if (!ret) {
> + xe_gt_dbg(gt, "Flush G2H worker to service H2G action %#x\n",
> + action[0]);
Seems like this could be a single line and still not hit the 100
character line length limit.
> + flush_work(&ct->g2h_worker);
> + if (g2h_fence.done)
> + ret = 1;
> + }
Again, are we wanting this to be a permanent change or is it intended as
just a temporary workaround? If the latter, there needs to be a comment
to explain the situation.
I would also prefer to have the debug print only in the case where
fence.done was set after the flush. And I wonder if it is also worth
making it a warn. That way CI will track how often this is happening and
on what systems.
John.
> +
> /*
> * Ensure we serialize with completion side to prevent UAF with fence going out of scope on
> * the stack, since we have no clue if it will fire after the timeout before we can erase
next prev parent reply other threads:[~2024-10-09 19:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 10:56 [PATCH 0/3] Handle G2H response timeout Badal Nilawar
2024-10-09 10:56 ` [PATCH 1/3] drm/xe/guc/ct: Improve g2h request handling during async gt reset Badal Nilawar
2024-10-09 19:41 ` John Harrison
2024-10-10 23:03 ` Matthew Brost
2024-10-10 23:01 ` Matthew Brost
2024-10-14 12:10 ` Nilawar, Badal
2024-10-14 15:57 ` Matthew Brost
2024-10-09 10:56 ` [PATCH 2/3] drm/xe/guc/ct: Increase wait timeout for g2h response Badal Nilawar
2024-10-09 19:43 ` John Harrison
2024-10-10 23:06 ` Matthew Brost
2024-10-14 12:12 ` Nilawar, Badal
2024-10-17 9:54 ` Anshuman Gupta
2024-10-09 10:56 ` [PATCH 3/3] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout Badal Nilawar
2024-10-09 19:50 ` John Harrison [this message]
2024-10-10 23:09 ` Matthew Brost
2024-10-09 13:58 ` ✓ CI.Patch_applied: success for Handle G2H " Patchwork
2024-10-09 13:58 ` ✓ CI.checkpatch: " Patchwork
2024-10-09 14:00 ` ✓ CI.KUnit: " Patchwork
2024-10-09 14:13 ` ✓ CI.Build: " Patchwork
2024-10-09 14:15 ` ✓ CI.Hooks: " Patchwork
2024-10-09 14:17 ` ✓ CI.checksparse: " Patchwork
2024-10-09 14:45 ` ✓ CI.BAT: " Patchwork
2024-10-09 22:54 ` ✗ 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=65cf53a0-1696-44bb-8606-83f867b7c545@intel.com \
--to=john.c.harrison@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@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