mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Julian Stecklina <julian.stecklina@cyberus-technology.de>
Cc: intel-gvt-dev@lists.freedesktop.org,
	Thomas Prescher <thomas.prescher@cyberus-technology.de>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/gvt: print actionable error message when gm runs out
Date: Fri, 5 Jun 2020 12:54:30 +0800	[thread overview]
Message-ID: <20200605045430.GS5687@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <20200603123321.263895-1-julian.stecklina@cyberus-technology.de>

[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]

On 2020.06.03 14:33:21 +0200, Julian Stecklina wrote:
> When a user tries to allocate too many or too big vGPUs and runs out
> of graphics memory, the resulting error message is not actionable and
> looks like an internal error.
> 
> Change the error message to clearly point out what actions a user can
> take to resolve this situation.
> 
> Cc: Thomas Prescher <thomas.prescher@cyberus-technology.de>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
> ---
>  drivers/gpu/drm/i915/gvt/aperture_gm.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/aperture_gm.c b/drivers/gpu/drm/i915/gvt/aperture_gm.c
> index 0d6d598713082..5c5c8e871dae2 100644
> --- a/drivers/gpu/drm/i915/gvt/aperture_gm.c
> +++ b/drivers/gpu/drm/i915/gvt/aperture_gm.c
> @@ -69,9 +69,12 @@ static int alloc_gm(struct intel_vgpu *vgpu, bool high_gm)
>  				  start, end, flags);
>  	mmio_hw_access_post(gt);
>  	mutex_unlock(&gt->ggtt->vm.mutex);
> -	if (ret)
> -		gvt_err("fail to alloc %s gm space from host\n",
> -			high_gm ? "high" : "low");
> +	if (ret) {
> +		gvt_err("vgpu%d: failed to allocate %s gm space from host\n",
> +			vgpu->id, high_gm ? "high" : "low");
> +		gvt_err("vgpu%d: destroying vGPUs, decreasing vGPU memory size or increasing GPU aperture size may resolve this\n",
> +			vgpu->id);

Currently we can't decrease vGPU mem size as defined by mdev type,
so actually you may try different vGPU type. And aperture size is
also handled for supported vGPU mdev types, so assume user should
already be awared of that too. I just don't want us to be too chatty. :)

> +	}
>  
>  	return ret;
>  }
> -- 
> 2.26.2
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2020-06-05  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 12:33 Julian Stecklina
2020-06-05  4:54 ` Zhenyu Wang [this message]
2020-06-05 11:08   ` Julian Stecklina

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=20200605045430.GS5687@zhen-hp.sh.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=julian.stecklina@cyberus-technology.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.prescher@cyberus-technology.de \
    /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

all inboxes | Powered by JetHome®