Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: intel-xe@lists.freedesktop.org,
	"Michał Wajdeczko" <michal.wajdeczko@intel.com>,
	"Michał Winiarski" <michal.winiarski@intel.com>
Subject: Re: [PATCH v2 2/2] drm/xe/vf: Retry sending MMIO request to GUC on timeout error
Date: Fri, 21 Feb 2025 09:26:52 +0100	[thread overview]
Message-ID: <20250221082652.yxic6gsa2gpdfnof@intel.com> (raw)
In-Reply-To: <20250221055722.21370-3-satyanarayana.k.v.p@intel.com>

Satyanarayana K V P <satyanarayana.k.v.p@intel.com> wrote on pią [2025-lut-21 11:27:22 +0530]:
> Add support to allow retrying the sending of MMIO requests
> from the VF to the GUC in the event of an error. During the
> suspend/resume process, VFs begin resuming only after the PF has
> resumed. Although the PF resumes, the GUC reset and provisioning
> occur later in a separate worker process.
> 
> When there are a large number of VFs, some may attempt to resume
> before the PF has completed its provisioning. Therefore, if a
> MMIO request from a VF fails during this period, we will retry
> sending the request up to GUC_RESET_VF_STATE_RETRY_MAX times,
> which is set to a maximum of 10 attempts.
> 
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 4831549da319..a439261bf4d7 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -47,12 +47,19 @@ static int guc_action_vf_reset(struct xe_guc *guc)
>  	return ret > 0 ? -EPROTO : ret;
>  }
>  
> +#define GUC_RESET_VF_STATE_RETRY_MAX	10
>  static int vf_reset_guc_state(struct xe_gt *gt)
>  {
> +	unsigned int retry = GUC_RESET_VF_STATE_RETRY_MAX;
>  	struct xe_guc *guc = &gt->uc.guc;
>  	int err;
>  
> -	err = guc_action_vf_reset(guc);
> +	do {
> +		err = guc_action_vf_reset(guc);
> +		if (!err || err != -ETIMEDOUT)
> +			break;
> +	} while (--retry);
> +

LGTM:
Reviewed-by: Piotr Piorkowski <piotr.piorkowski@intel.com>
>  	if (unlikely(err))
>  		xe_gt_sriov_err(gt, "Failed to reset GuC state (%pe)\n", ERR_PTR(err));
>  	return err;
> -- 
> 2.35.3
> 

-- 

  reply	other threads:[~2025-02-21  8:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21  5:57 [PATCH v2 0/2] Fix VFs resume errors Satyanarayana K V P
2025-02-21  5:46 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-21  5:47 ` ✓ CI.checkpatch: " Patchwork
2025-02-21  5:48 ` ✓ CI.KUnit: " Patchwork
2025-02-21  5:57 ` [PATCH v2 1/2] drm/xe/pf: Create a link between PF and VF devices Satyanarayana K V P
2025-02-21  8:25   ` Piotr Piórkowski
2025-02-21  5:57 ` [PATCH v2 2/2] drm/xe/vf: Retry sending MMIO request to GUC on timeout error Satyanarayana K V P
2025-02-21  8:26   ` Piotr Piórkowski [this message]
2025-02-21  6:04 ` ✓ CI.Build: success for Fix VFs resume errors Patchwork
2025-02-21  6:07 ` ✓ CI.Hooks: " Patchwork
2025-02-21  6:08 ` ✓ CI.checksparse: " Patchwork
2025-02-21  6:28 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-21 19:46 ` ✗ 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=20250221082652.yxic6gsa2gpdfnof@intel.com \
    --to=piotr.piorkowski@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=michal.winiarski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox