Stable Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drm/i915: Rate limit 'Fault errors' message
@ 2020-10-16 15:23 Stefan Fritsch
  2020-10-19  6:43 ` Joonas Lahtinen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Fritsch @ 2020-10-16 15:23 UTC (permalink / raw)
  To: intel-gfx
  Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Stefan Fritsch, stable

If linux is running as a guest and the host is doing igd pass-through
with VT-d enabled, this message is logged dozens of times per second.

Cc: stable@vger.kernel.org
Signed-off-by: Stefan Fritsch <sf@sfritsch.de>
---

The i915 driver should also detect VT-d in this case, but that is a
different issue.  I have sent a separate mail with subject 'Detecting
Vt-d when running as guest os'.


 drivers/gpu/drm/i915/i915_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 759f523c6a6b..29096634e697 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2337,7 +2337,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 
 		fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
 		if (fault_errors)
-			drm_err(&dev_priv->drm,
+			drm_err_ratelimited(&dev_priv->drm,
 				"Fault errors on pipe %c: 0x%08x\n",
 				pipe_name(pipe),
 				fault_errors);
-- 
2.28.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Rate limit 'Fault errors' message
  2020-10-16 15:23 [PATCH] drm/i915: Rate limit 'Fault errors' message Stefan Fritsch
@ 2020-10-19  6:43 ` Joonas Lahtinen
  2020-10-19  7:03   ` Stefan Fritsch
  0 siblings, 1 reply; 3+ messages in thread
From: Joonas Lahtinen @ 2020-10-19  6:43 UTC (permalink / raw)
  To: Stefan Fritsch, intel-gfx, Zhenyu Wang, Zhi Wang
  Cc: Jani Nikula, Rodrigo Vivi, Stefan Fritsch, stable

+ Zhenyu & Zhi,

Should not we instead fix the reason why the errors happen instead of
rate-limiting them?

Regards, Joonas

Quoting Stefan Fritsch (2020-10-16 18:23:40)
> If linux is running as a guest and the host is doing igd pass-through
> with VT-d enabled, this message is logged dozens of times per second.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Stefan Fritsch <sf@sfritsch.de>
> ---
> 
> The i915 driver should also detect VT-d in this case, but that is a
> different issue.  I have sent a separate mail with subject 'Detecting
> Vt-d when running as guest os'.
> 
> 
>  drivers/gpu/drm/i915/i915_irq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 759f523c6a6b..29096634e697 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2337,7 +2337,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
>  
>                 fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
>                 if (fault_errors)
> -                       drm_err(&dev_priv->drm,
> +                       drm_err_ratelimited(&dev_priv->drm,
>                                 "Fault errors on pipe %c: 0x%08x\n",
>                                 pipe_name(pipe),
>                                 fault_errors);
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Rate limit 'Fault errors' message
  2020-10-19  6:43 ` Joonas Lahtinen
@ 2020-10-19  7:03   ` Stefan Fritsch
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Fritsch @ 2020-10-19  7:03 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx, Zhenyu Wang, Zhi Wang
  Cc: Jani Nikula, Rodrigo Vivi, stable

I think we should do both. Any log message that can be triggered 50 
times per second in practice should be rate limited. Also, the rate 
limiting is probably a candidate for backporting to stable kernels while 
the real fix may be not.

PS: See also my other mail about "drm/i915: Detecting Vt-d when running 
as guest os"

On 19.10.20 08:43, Joonas Lahtinen wrote:
> + Zhenyu & Zhi,
> 
> Should not we instead fix the reason why the errors happen instead of
> rate-limiting them?
> 
> Regards, Joonas
> 
> Quoting Stefan Fritsch (2020-10-16 18:23:40)
>> If linux is running as a guest and the host is doing igd pass-through
>> with VT-d enabled, this message is logged dozens of times per second.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Stefan Fritsch <sf@sfritsch.de>
>> ---
>>
>> The i915 driver should also detect VT-d in this case, but that is a
>> different issue.  I have sent a separate mail with subject 'Detecting
>> Vt-d when running as guest os'.
>>
>>
>>   drivers/gpu/drm/i915/i915_irq.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
>> index 759f523c6a6b..29096634e697 100644
>> --- a/drivers/gpu/drm/i915/i915_irq.c
>> +++ b/drivers/gpu/drm/i915/i915_irq.c
>> @@ -2337,7 +2337,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
>>   
>>                  fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
>>                  if (fault_errors)
>> -                       drm_err(&dev_priv->drm,
>> +                       drm_err_ratelimited(&dev_priv->drm,
>>                                  "Fault errors on pipe %c: 0x%08x\n",
>>                                  pipe_name(pipe),
>>                                  fault_errors);
>> -- 
>> 2.28.0
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 15:23 [PATCH] drm/i915: Rate limit 'Fault errors' message Stefan Fritsch
2020-10-19  6:43 ` Joonas Lahtinen
2020-10-19  7:03   ` Stefan Fritsch

Stable Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://lore.kernel.org/stable \
		stable@vger.kernel.org
	public-inbox-index stable

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git