All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Paulo Zanoni" <paulo.r.zanoni@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Coelho, Luciano" <luciano.coelho@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [Intel-xe] [PATCH] drm/i915: don't use uncore spinlock to protect critical section in vblank
Date: Fri, 17 Nov 2023 11:50:35 -0500	[thread overview]
Message-ID: <ZVeZ2xYYs3NYftvm@intel.com> (raw)
In-Reply-To: <ZVcx1MSvP0UgZ14o@intel.com>

On Fri, Nov 17, 2023 at 11:26:44AM +0200, Ville Syrjälä wrote:
> On Fri, Nov 17, 2023 at 10:41:43AM +0200, Ville Syrjälä wrote:
> > On Fri, Nov 17, 2023 at 08:05:21AM +0000, Coelho, Luciano wrote:
> > > Thanks for your comments, Ville!
> > > 
> > > On Fri, 2023-11-17 at 09:19 +0200, Ville Syrjälä wrote:
> > > > On Thu, Nov 16, 2023 at 01:27:00PM +0200, Luca Coelho wrote:
> > > > > Since we're abstracting the display code from the underlying driver
> > > > > (i.e. i915 vs xe), we can't use the uncore's spinlock to protect
> > > > > critical sections of our code.
> > > > > 
> > > > > After further inspection, it seems that the spinlock is not needed at
> > > > > all and this can be handled by disabling preemption and interrupts
> > > > > instead.
> > > > 
> > > > uncore.lock has multiple purposes:
> > > > 1. serialize all register accesses to the same cacheline as on
> > > >    certain platforms that can hang the machine
> > > 
> > > Okay, do you remember which platforms?
> > 
> > HSW is the one I remember for sure being affected.
> > Althoguh I don't recall if I ever managed to hang it
> > using display registers specifically. intel_gpu_top
> > certainly was very good at reproducing the problem.
> > 
> > > I couldn't find any reference to
> > > this reason. 
> > 
> > If all else fails git log is your friend.
> 
> It seems to be documented in intel_uncore.h. Though that one
> mentions IVB instead of HSW for some reason. I don't recall
> seeing it on IVB myself, but I suppose it might have been an
> issue there as well. How long the problem remained after HSW
> I have no idea.

Paulo very recently told me that he could easily reproduce the issue
on IVB, simply by running 2 glxgears at the same time.

> 
> > 
> > > Also, the only place where where we take the uncore.lock
> > > is in this vblank code I changed, where the only explanation I found
> > > was about timing, specifically when using RT-kernels and in very old
> > > and slow platforms... (this was added 10 years ago).
> > > 
> > > 
> > > > 2. protect the forcewake/etc. state
> > > > 
> > > > 1 is relevant here, 2 is not.
> > > 
> > > Okay, good that we have only one known problem. :)

and good it is an old one! :)

> > > 
> > > --
> > > Cheers,
> > > Luca.
> > 
> > -- 
> > Ville Syrjälä
> > Intel
> 
> -- 
> Ville Syrjälä
> Intel

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Paulo Zanoni" <paulo.r.zanoni@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Coelho, Luciano" <luciano.coelho@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [Intel-xe] [Intel-gfx] [PATCH] drm/i915: don't use uncore spinlock to protect critical section in vblank
Date: Fri, 17 Nov 2023 11:50:35 -0500	[thread overview]
Message-ID: <ZVeZ2xYYs3NYftvm@intel.com> (raw)
In-Reply-To: <ZVcx1MSvP0UgZ14o@intel.com>

On Fri, Nov 17, 2023 at 11:26:44AM +0200, Ville Syrjälä wrote:
> On Fri, Nov 17, 2023 at 10:41:43AM +0200, Ville Syrjälä wrote:
> > On Fri, Nov 17, 2023 at 08:05:21AM +0000, Coelho, Luciano wrote:
> > > Thanks for your comments, Ville!
> > > 
> > > On Fri, 2023-11-17 at 09:19 +0200, Ville Syrjälä wrote:
> > > > On Thu, Nov 16, 2023 at 01:27:00PM +0200, Luca Coelho wrote:
> > > > > Since we're abstracting the display code from the underlying driver
> > > > > (i.e. i915 vs xe), we can't use the uncore's spinlock to protect
> > > > > critical sections of our code.
> > > > > 
> > > > > After further inspection, it seems that the spinlock is not needed at
> > > > > all and this can be handled by disabling preemption and interrupts
> > > > > instead.
> > > > 
> > > > uncore.lock has multiple purposes:
> > > > 1. serialize all register accesses to the same cacheline as on
> > > >    certain platforms that can hang the machine
> > > 
> > > Okay, do you remember which platforms?
> > 
> > HSW is the one I remember for sure being affected.
> > Althoguh I don't recall if I ever managed to hang it
> > using display registers specifically. intel_gpu_top
> > certainly was very good at reproducing the problem.
> > 
> > > I couldn't find any reference to
> > > this reason. 
> > 
> > If all else fails git log is your friend.
> 
> It seems to be documented in intel_uncore.h. Though that one
> mentions IVB instead of HSW for some reason. I don't recall
> seeing it on IVB myself, but I suppose it might have been an
> issue there as well. How long the problem remained after HSW
> I have no idea.

Paulo very recently told me that he could easily reproduce the issue
on IVB, simply by running 2 glxgears at the same time.

> 
> > 
> > > Also, the only place where where we take the uncore.lock
> > > is in this vblank code I changed, where the only explanation I found
> > > was about timing, specifically when using RT-kernels and in very old
> > > and slow platforms... (this was added 10 years ago).
> > > 
> > > 
> > > > 2. protect the forcewake/etc. state
> > > > 
> > > > 1 is relevant here, 2 is not.
> > > 
> > > Okay, good that we have only one known problem. :)

and good it is an old one! :)

> > > 
> > > --
> > > Cheers,
> > > Luca.
> > 
> > -- 
> > Ville Syrjälä
> > Intel
> 
> -- 
> Ville Syrjälä
> Intel

  parent reply	other threads:[~2023-11-17 16:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 11:27 [Intel-gfx] [PATCH] drm/i915: don't use uncore spinlock to protect critical section in vblank Luca Coelho
2023-11-16 11:27 ` [Intel-xe] " Luca Coelho
2023-11-16 11:30 ` [Intel-xe] ✗ CI.Patch_applied: failure for " Patchwork
2023-11-16 16:03 ` [Intel-gfx] ✗ Fi.CI.BAT: " Patchwork
2023-11-17  7:19 ` [Intel-gfx] [Intel-xe] [PATCH] " Ville Syrjälä
2023-11-17  7:19   ` Ville Syrjälä
2023-11-17  8:05   ` [Intel-gfx] " Coelho, Luciano
2023-11-17  8:05     ` [Intel-xe] [Intel-gfx] " Coelho, Luciano
2023-11-17  8:41     ` [Intel-gfx] [Intel-xe] " Ville Syrjälä
2023-11-17  8:41       ` [Intel-xe] [Intel-gfx] " Ville Syrjälä
2023-11-17  8:46       ` [Intel-gfx] [Intel-xe] " Coelho, Luciano
2023-11-17  8:46         ` [Intel-xe] [Intel-gfx] " Coelho, Luciano
2023-11-17  9:26       ` [Intel-gfx] [Intel-xe] " Ville Syrjälä
2023-11-17  9:26         ` [Intel-xe] [Intel-gfx] " Ville Syrjälä
2023-11-17 12:21         ` [Intel-gfx] [Intel-xe] " Coelho, Luciano
2023-11-17 12:21           ` [Intel-xe] [Intel-gfx] " Coelho, Luciano
2023-11-17 12:46           ` [Intel-gfx] [Intel-xe] " Tvrtko Ursulin
2023-11-17 12:46             ` [Intel-xe] [Intel-gfx] " Tvrtko Ursulin
2023-11-29  8:20             ` [Intel-gfx] [Intel-xe] " Coelho, Luciano
2023-11-29  8:20               ` [Intel-xe] [Intel-gfx] " Coelho, Luciano
2023-11-17 16:50         ` Rodrigo Vivi [this message]
2023-11-17 16:50           ` Rodrigo Vivi
2023-11-17 17:15           ` [Intel-gfx] [Intel-xe] " Zanoni, Paulo R
2023-11-17 17:15             ` [Intel-xe] [Intel-gfx] " Zanoni, Paulo R
2023-11-29  8:22             ` [Intel-gfx] [Intel-xe] " Coelho, Luciano
2023-11-29  8:22               ` [Intel-xe] [Intel-gfx] " Coelho, Luciano
2023-11-18  0:50 ` [Intel-xe] ✗ CI.Patch_applied: failure for " 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=ZVeZ2xYYs3NYftvm@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=luciano.coelho@intel.com \
    --cc=paulo.r.zanoni@intel.com \
    --cc=ville.syrjala@linux.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.