From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Lukasz Laguna <lukasz.laguna@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <satyanarayana.k.v.p@intel.com>
Subject: Re: [PATCH] drm/xe/vf: Retry GuC state reset until timeout
Date: Mon, 31 Aug 2026 12:06:11 +0200 [thread overview]
Message-ID: <602fcc3e-78bc-45e7-93ad-fa3f3ee43a1d@intel.com> (raw)
In-Reply-To: <20260831092118.488317-1-lukasz.laguna@intel.com>
On 8/31/2026 11:21 AM, Lukasz Laguna wrote:
> Instead of using a fixed number of GuC state reset retries, keep
> retrying until timeout with sleeps between attempts.
why?
why 10s?
you should describe the problem first
>
> Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 37899fcf5b22..01873896f77b 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -31,6 +31,7 @@
> #include "xe_lrc.h"
> #include "xe_memirq.h"
> #include "xe_mmio.h"
> +#include "xe_sleep.h"
> #include "xe_sriov.h"
> #include "xe_sriov_vf.h"
> #include "xe_sriov_vf_ccs.h"
> @@ -86,18 +87,23 @@ static int guc_action_vf_reset(struct xe_guc *guc)
> return ret > 0 ? -EPROTO : ret;
> }
>
> -#define GUC_RESET_VF_STATE_RETRY_MAX 10
> +#define GUC_RESET_VF_STATE_TIMEOUT_MS 10000
10 * MSEC_PER_SEC /* 10s */
> +#define GUC_RESET_VF_STATE_SLEEP_MS 10
> +
> static int vf_reset_guc_state(struct xe_gt *gt)
> {
> - unsigned int retry = GUC_RESET_VF_STATE_RETRY_MAX;
> struct xe_guc *guc = >->uc.guc;
> + unsigned long jiffies_end;
> int err;
>
> + jiffies_end = jiffies + msecs_to_jiffies(GUC_RESET_VF_STATE_TIMEOUT_MS);
> do {
> err = guc_action_vf_reset(guc);
> if (!err || err != -ETIMEDOUT)
> break;
> - } while (--retry);
> +
> + xe_sleep_relaxed_ms(GUC_RESET_VF_STATE_SLEEP_MS);
> + } while (time_before(jiffies, jiffies_end));
btw, maybe we can use poll_timeout_us() here?
>
> if (unlikely(err))
> xe_gt_sriov_err(gt, "Failed to reset GuC state (%pe)\n", ERR_PTR(err));
next prev parent reply other threads:[~2026-08-31 10:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 9:21 [PATCH] drm/xe/vf: Retry GuC state reset until timeout Lukasz Laguna
2026-08-31 9:45 ` K V P, Satyanarayana
2026-08-31 10:06 ` Michal Wajdeczko [this message]
2026-08-31 17:16 ` Laguna, Lukasz
2026-08-31 13:59 ` ✓ CI.KUnit: success for " Patchwork
2026-08-31 14:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-31 16:27 ` ✓ Xe.CI.FULL: " 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=602fcc3e-78bc-45e7-93ad-fa3f3ee43a1d@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lukasz.laguna@intel.com \
--cc=satyanarayana.k.v.p@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.