Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636978 > unrolled thread

Re: [git pull] drm pull for v4.12

Started byLinus Torvalds <torvalds@linux-foundation.org>
First post2017-05-06 22:10 +0200
Last post2017-05-08 01:00 +0200
Articles 9 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [git pull] drm pull for v4.12 Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-06 22:10 +0200
    Re: [PATCH] drm/i915: Make vblank evade warnings optional Jens Axboe <axboe@kernel.dk> - 2017-05-08 00:00 +0200
      Re: [PATCH] drm/i915: Make vblank evade warnings optional Daniel Vetter <daniel@ffwll.ch> - 2017-05-08 01:10 +0200
        Re: [PATCH] drm/i915: Make vblank evade warnings optional Jens Axboe <axboe@kernel.dk> - 2017-05-08 04:00 +0200
          Re: [PATCH] drm/i915: Make vblank evade warnings optional Daniel Vetter <daniel@ffwll.ch> - 2017-05-08 09:30 +0200
            Re: [PATCH] drm/i915: Make vblank evade warnings optional Jens Axboe <axboe@kernel.dk> - 2017-05-08 17:20 +0200
    [PATCH] drm/i915: Make vblank evade warnings optional ville.syrjala@linux.intel.com - 2017-05-08 00:30 +0200
      Re: [PATCH] drm/i915: Make vblank evade warnings optional Daniel Vetter <daniel@ffwll.ch> - 2017-05-08 09:30 +0200
    Re: [git pull] drm pull for v4.12 Daniel Vetter <daniel@ffwll.ch> - 2017-05-08 01:00 +0200

#1636978 — Re: [git pull] drm pull for v4.12

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2017-05-06 22:10 +0200
SubjectRe: [git pull] drm pull for v4.12
Message-ID<tEebD-47R-1@gated-at.bofh.it>
On Tue, May 2, 2017 at 8:44 PM, Dave Airlie <airlied@gmail.com> wrote:
>
> i915:
> vblank evasion improvements

These may be "improvements", but they end up being very noisy.

I geta fair amount of messages like

  [drm] Atomic update on pipe (A) took 161 us, max time under evasion is 100 us

on my desktop (i7-6700K) and I've seen it once on my laptop (i7-6560U) too.

The commit message says "This will make it easier to find cases where
we potentially miss vblanks." but I'm not sure how that is the case.
There's nothing else helpful in the log, and it doesn't seem to be
associated with anything in particular (I'm just at the desktop,
running a few xterms and google-chrome).

                 Linus

[toc] | [next] | [standalone]


#1637058 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromJens Axboe <axboe@kernel.dk>
Date2017-05-08 00:00 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tECnF-34t-59@gated-at.bofh.it>
In reply to#1636978
On 05/07/2017 11:12 AM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a new Kconfig option to enable/disable the extra warnings
> from the vblank evade code. For now we'll keep the warning
> about an actually missed vblank always enabled as that can have
> an actual user visible impact. But if we miss the deadline
> othrwise there's no real need to bother the user with that.
> We'll want these warnings enabled during development however
> so that we can catch regressions.
> 
> Based on the reports it looks like this is still very easy
> to hit on SKL, so we have more work ahead of us to optimize
> the crtiical section further.

Shouldn't it just be a debug printk or something instead, so that normal
people don't see it, but the folks that turn on debugging can get the
info they need? Seems silly to add a kconfig option for this.

-- 
Jens Axboe

[toc] | [prev] | [next] | [standalone]


#1637141 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-08 01:10 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tEDto-46D-15@gated-at.bofh.it>
In reply to#1637058
On Sun, May 7, 2017 at 7:46 PM, Jens Axboe <axboe@kernel.dk> wrote:
> On 05/07/2017 11:12 AM, ville.syrjala@linux.intel.com wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Add a new Kconfig option to enable/disable the extra warnings
>> from the vblank evade code. For now we'll keep the warning
>> about an actually missed vblank always enabled as that can have
>> an actual user visible impact. But if we miss the deadline
>> othrwise there's no real need to bother the user with that.
>> We'll want these warnings enabled during development however
>> so that we can catch regressions.
>>
>> Based on the reports it looks like this is still very easy
>> to hit on SKL, so we have more work ahead of us to optimize
>> the crtiical section further.
>
> Shouldn't it just be a debug printk or something instead, so that normal
> people don't see it, but the folks that turn on debugging can get the
> info they need? Seems silly to add a kconfig option for this.

I guess we could keep it as debug for users, but we want to make this
a hard failure on our CI machines. Kconfig knob is the easiest to roll
out to all machines.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1637187 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromJens Axboe <axboe@kernel.dk>
Date2017-05-08 04:00 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tEG7T-5FW-3@gated-at.bofh.it>
In reply to#1637141
On 05/07/2017 11:56 AM, Daniel Vetter wrote:
> On Sun, May 7, 2017 at 7:46 PM, Jens Axboe <axboe@kernel.dk> wrote:
>> On 05/07/2017 11:12 AM, ville.syrjala@linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> Add a new Kconfig option to enable/disable the extra warnings
>>> from the vblank evade code. For now we'll keep the warning
>>> about an actually missed vblank always enabled as that can have
>>> an actual user visible impact. But if we miss the deadline
>>> othrwise there's no real need to bother the user with that.
>>> We'll want these warnings enabled during development however
>>> so that we can catch regressions.
>>>
>>> Based on the reports it looks like this is still very easy
>>> to hit on SKL, so we have more work ahead of us to optimize
>>> the crtiical section further.
>>
>> Shouldn't it just be a debug printk or something instead, so that normal
>> people don't see it, but the folks that turn on debugging can get the
>> info they need? Seems silly to add a kconfig option for this.
> 
> I guess we could keep it as debug for users, but we want to make this
> a hard failure on our CI machines. Kconfig knob is the easiest to roll
> out to all machines.

Wouldn't a module parameter be more useful then, as an opt-in
to catch these violations.

Nobody is going to know wtf to set this kconfig option to.

-- 
Jens Axboe

[toc] | [prev] | [next] | [standalone]


#1637268 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-08 09:30 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tELhf-SA-9@gated-at.bofh.it>
In reply to#1637187
On Sun, May 07, 2017 at 07:52:14PM -0600, Jens Axboe wrote:
> On 05/07/2017 11:56 AM, Daniel Vetter wrote:
> > On Sun, May 7, 2017 at 7:46 PM, Jens Axboe <axboe@kernel.dk> wrote:
> >> On 05/07/2017 11:12 AM, ville.syrjala@linux.intel.com wrote:
> >>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>>
> >>> Add a new Kconfig option to enable/disable the extra warnings
> >>> from the vblank evade code. For now we'll keep the warning
> >>> about an actually missed vblank always enabled as that can have
> >>> an actual user visible impact. But if we miss the deadline
> >>> othrwise there's no real need to bother the user with that.
> >>> We'll want these warnings enabled during development however
> >>> so that we can catch regressions.
> >>>
> >>> Based on the reports it looks like this is still very easy
> >>> to hit on SKL, so we have more work ahead of us to optimize
> >>> the crtiical section further.
> >>
> >> Shouldn't it just be a debug printk or something instead, so that normal
> >> people don't see it, but the folks that turn on debugging can get the
> >> info they need? Seems silly to add a kconfig option for this.
> > 
> > I guess we could keep it as debug for users, but we want to make this
> > a hard failure on our CI machines. Kconfig knob is the easiest to roll
> > out to all machines.
> 
> Wouldn't a module parameter be more useful then, as an opt-in
> to catch these violations.
> 
> Nobody is going to know wtf to set this kconfig option to.

They're all hidden behind an overall i915 debugging option which tells you
not to enable it. You won't see this.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1637498 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromJens Axboe <axboe@kernel.dk>
Date2017-05-08 17:20 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tESC6-5Ad-11@gated-at.bofh.it>
In reply to#1637268
On 05/08/2017 01:25 AM, Daniel Vetter wrote:
> On Sun, May 07, 2017 at 07:52:14PM -0600, Jens Axboe wrote:
>> On 05/07/2017 11:56 AM, Daniel Vetter wrote:
>>> On Sun, May 7, 2017 at 7:46 PM, Jens Axboe <axboe@kernel.dk> wrote:
>>>> On 05/07/2017 11:12 AM, ville.syrjala@linux.intel.com wrote:
>>>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>>
>>>>> Add a new Kconfig option to enable/disable the extra warnings
>>>>> from the vblank evade code. For now we'll keep the warning
>>>>> about an actually missed vblank always enabled as that can have
>>>>> an actual user visible impact. But if we miss the deadline
>>>>> othrwise there's no real need to bother the user with that.
>>>>> We'll want these warnings enabled during development however
>>>>> so that we can catch regressions.
>>>>>
>>>>> Based on the reports it looks like this is still very easy
>>>>> to hit on SKL, so we have more work ahead of us to optimize
>>>>> the crtiical section further.
>>>>
>>>> Shouldn't it just be a debug printk or something instead, so that normal
>>>> people don't see it, but the folks that turn on debugging can get the
>>>> info they need? Seems silly to add a kconfig option for this.
>>>
>>> I guess we could keep it as debug for users, but we want to make this
>>> a hard failure on our CI machines. Kconfig knob is the easiest to roll
>>> out to all machines.
>>
>> Wouldn't a module parameter be more useful then, as an opt-in
>> to catch these violations.
>>
>> Nobody is going to know wtf to set this kconfig option to.
> 
> They're all hidden behind an overall i915 debugging option which tells you
> not to enable it. You won't see this.

OK, that does improve things a bit.

-- 
Jens Axboe

[toc] | [prev] | [next] | [standalone]


#1637107 — [PATCH] drm/i915: Make vblank evade warnings optional

Fromville.syrjala@linux.intel.com
Date2017-05-08 00:30 +0200
Subject[PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tECnF-34t-61@gated-at.bofh.it>
In reply to#1636978
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a new Kconfig option to enable/disable the extra warnings
from the vblank evade code. For now we'll keep the warning
about an actually missed vblank always enabled as that can have
an actual user visible impact. But if we miss the deadline
othrwise there's no real need to bother the user with that.
We'll want these warnings enabled during development however
so that we can catch regressions.

Based on the reports it looks like this is still very easy
to hit on SKL, so we have more work ahead of us to optimize
the crtiical section further.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reported-by: Jens Axboe <axboe@kernel.dk>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/Kconfig.debug  | 13 +++++++++++++
 drivers/gpu/drm/i915/intel_sprite.c |  7 +++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index e091809a9a9e..49db32fa6524 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -87,3 +87,16 @@ config DRM_I915_LOW_LEVEL_TRACEPOINTS
           and also analyze the request dependency resolving timeline.
 
           If in doubt, say "N".
+
+config DRM_I915_DEBUG_VBLANK_EVADE
+	bool "Enable extra debug warnings for vblank evasion"
+	depends on DRM_I915
+	default n
+	help
+	  Choose this option to turn on extra debug warnings for the
+	  vblank evade mechanism. This gives a warning every time the
+	  the deadline allotted for the vblank evade critical section
+	  is exceeded, even if there isn't an actual risk of missing
+	  the vblank.
+
+	  If in doubt, say "N".
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index f7d431427115..8c87c717c7cd 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -198,12 +198,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
 			  ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
 			  crtc->debug.min_vbl, crtc->debug.max_vbl,
 			  crtc->debug.scanline_start, scanline_end);
-	} else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
-		   VBLANK_EVASION_TIME_US)
+	}
+#ifdef CONFIG_DRM_I915_DEBUG_VBLANK_EVADE
+	else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
+		 VBLANK_EVASION_TIME_US)
 		DRM_WARN("Atomic update on pipe (%c) took %lld us, max time under evasion is %u us\n",
 			 pipe_name(pipe),
 			 ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
 			 VBLANK_EVASION_TIME_US);
+#endif
 }
 
 static void
-- 
2.10.2

[toc] | [prev] | [next] | [standalone]


#1637267 — Re: [PATCH] drm/i915: Make vblank evade warnings optional

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-08 09:30 +0200
SubjectRe: [PATCH] drm/i915: Make vblank evade warnings optional
Message-ID<tELhf-SA-7@gated-at.bofh.it>
In reply to#1637107
On Sun, May 07, 2017 at 08:12:52PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a new Kconfig option to enable/disable the extra warnings
> from the vblank evade code. For now we'll keep the warning
> about an actually missed vblank always enabled as that can have
> an actual user visible impact. But if we miss the deadline
> othrwise there's no real need to bother the user with that.
> We'll want these warnings enabled during development however
> so that we can catch regressions.
> 
> Based on the reports it looks like this is still very easy
> to hit on SKL, so we have more work ahead of us to optimize
> the crtiical section further.
> 
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reported-by: Jens Axboe <axboe@kernel.dk>
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Fixes: e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/i915/Kconfig.debug  | 13 +++++++++++++
>  drivers/gpu/drm/i915/intel_sprite.c |  7 +++++--
>  2 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index e091809a9a9e..49db32fa6524 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -87,3 +87,16 @@ config DRM_I915_LOW_LEVEL_TRACEPOINTS
>            and also analyze the request dependency resolving timeline.
>  
>            If in doubt, say "N".
> +
> +config DRM_I915_DEBUG_VBLANK_EVADE
> +	bool "Enable extra debug warnings for vblank evasion"
> +	depends on DRM_I915
> +	default n
> +	help
> +	  Choose this option to turn on extra debug warnings for the
> +	  vblank evade mechanism. This gives a warning every time the
> +	  the deadline allotted for the vblank evade critical section
> +	  is exceeded, even if there isn't an actual risk of missing
> +	  the vblank.
> +
> +	  If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index f7d431427115..8c87c717c7cd 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -198,12 +198,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
>  			  ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
>  			  crtc->debug.min_vbl, crtc->debug.max_vbl,
>  			  crtc->debug.scanline_start, scanline_end);
> -	} else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
> -		   VBLANK_EVASION_TIME_US)
> +	}
> +#ifdef CONFIG_DRM_I915_DEBUG_VBLANK_EVADE
> +	else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
> +		 VBLANK_EVASION_TIME_US)
>  		DRM_WARN("Atomic update on pipe (%c) took %lld us, max time under evasion is %u us\n",
>  			 pipe_name(pipe),
>  			 ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
>  			 VBLANK_EVASION_TIME_US);
> +#endif
>  }
>  
>  static void
> -- 
> 2.10.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1637134

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-08 01:00 +0200
Message-ID<tEDjI-3LC-15@gated-at.bofh.it>
In reply to#1636978
On Sat, May 6, 2017 at 10:02 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Tue, May 2, 2017 at 8:44 PM, Dave Airlie <airlied@gmail.com> wrote:
>> i915:
>> vblank evasion improvements
>
> These may be "improvements", but they end up being very noisy.
>
> I geta fair amount of messages like
>
>   [drm] Atomic update on pipe (A) took 161 us, max time under evasion is 100 us
>
> on my desktop (i7-6700K) and I've seen it once on my laptop (i7-6560U) too.
>
> The commit message says "This will make it easier to find cases where
> we potentially miss vblanks." but I'm not sure how that is the case.
> There's nothing else helpful in the log, and it doesn't seem to be
> associated with anything in particular (I'm just at the desktop,
> running a few xterms and google-chrome).

We did improve evasion a lot to the point that it didn't show up in
our CI machines anymore (and we have a pile of those crunching tests
24/7), so we felt we could risk enabling this everywhere. But of
course it pops up all over the place as soon as drm-next hits
mainline, so we'll shut it down again except when debugging is enabled
(to make sure we catch regressions in our CI).

The evasion stuff is duct-tape around hw design issues and mostly
harmless (i.e. very unlikely it'll result in a real issue for you,
especially on normal Linux desktops that don't use overlay planes) if
you hit it, worst case should be flickering or some other temporary
visual corruptions. And the message happens when there's simply a
potential for a miss, not when we observed the race happening (i.e.
like lockdep splats about theoretical stuff).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web