[Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to dev_priv-dev_priv-mm.inactive_list

2013-07-05 Thread Xiong Zhang
obj-mm_list link to dev_priv-mm.inactive_list/active_list
obj-global_list link to dev_priv-mm.unbound_list/bound_list

Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com
---
 drivers/gpu/drm/i915/i915_gem.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 44d890b..b6a2402 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4637,7 +4637,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, 
struct shrink_control *sc)
list_for_each_entry(obj, dev_priv-mm.unbound_list, global_list)
if (obj-pages_pin_count == 0)
cnt += obj-base.size  PAGE_SHIFT;
-   list_for_each_entry(obj, dev_priv-mm.inactive_list, global_list)
+   list_for_each_entry(obj, dev_priv-mm.inactive_list, mm_list)
if (obj-pin_count == 0  obj-pages_pin_count == 0)
cnt += obj-base.size  PAGE_SHIFT;
 
-- 
1.7.9.5

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to dev_priv-dev_priv-mm.inactive_list

2013-07-05 Thread Daniel Vetter
On Fri, Jul 05, 2013 at 06:53:29PM +0800, Xiong Zhang wrote:
 obj-mm_list link to dev_priv-mm.inactive_list/active_list
 obj-global_list link to dev_priv-mm.unbound_list/bound_list
 
 Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com

Oh dear have I screwed this up.

This fixes a regression introduced in

commit 93927ca52a55c23e0a6a305e7e9082e8411ac9fa
Author: Daniel Vetter daniel.vet...@ffwll.ch
Date:   Thu Jan 10 18:03:00 2013 +0100

drm/i915: Revert shrinker changes from Track unbound pages

Cc: sta...@vger.kernel.org

Now the big question is why none of our tests has caught this. Xiong, how
have you tracked down this issues? Do you perhaps have a testcase that can
readily reproduce this that we could add to intel-gpu-tools?

Thanks, Daniel

 ---
  drivers/gpu/drm/i915/i915_gem.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
 index 44d890b..b6a2402 100644
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
 @@ -4637,7 +4637,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, 
 struct shrink_control *sc)
   list_for_each_entry(obj, dev_priv-mm.unbound_list, global_list)
   if (obj-pages_pin_count == 0)
   cnt += obj-base.size  PAGE_SHIFT;
 - list_for_each_entry(obj, dev_priv-mm.inactive_list, global_list)
 + list_for_each_entry(obj, dev_priv-mm.inactive_list, mm_list)
   if (obj-pin_count == 0  obj-pages_pin_count == 0)
   cnt += obj-base.size  PAGE_SHIFT;
  
 -- 
 1.7.9.5
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to dev_priv-dev_priv-mm.inactive_list

2013-07-05 Thread Zhang, Xiong Y
I found this issue when I read code. I don't have testcase.

thanks
-Original Message-
From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter
Sent: Friday, July 05, 2013 9:41 PM
To: Zhang, Xiong Y
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to 
dev_priv-dev_priv-mm.inactive_list

On Fri, Jul 05, 2013 at 06:53:29PM +0800, Xiong Zhang wrote:
 obj-mm_list link to dev_priv-mm.inactive_list/active_list
 obj-global_list link to dev_priv-mm.unbound_list/bound_list
 
 Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com

Oh dear have I screwed this up.

This fixes a regression introduced in

commit 93927ca52a55c23e0a6a305e7e9082e8411ac9fa
Author: Daniel Vetter daniel.vet...@ffwll.ch
Date:   Thu Jan 10 18:03:00 2013 +0100

drm/i915: Revert shrinker changes from Track unbound pages

Cc: sta...@vger.kernel.org

Now the big question is why none of our tests has caught this. Xiong, how have 
you tracked down this issues? Do you perhaps have a testcase that can readily 
reproduce this that we could add to intel-gpu-tools?

Thanks, Daniel

 ---
  drivers/gpu/drm/i915/i915_gem.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_gem.c 
 b/drivers/gpu/drm/i915/i915_gem.c index 44d890b..b6a2402 100644
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
 @@ -4637,7 +4637,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, 
 struct shrink_control *sc)
   list_for_each_entry(obj, dev_priv-mm.unbound_list, global_list)
   if (obj-pages_pin_count == 0)
   cnt += obj-base.size  PAGE_SHIFT;
 - list_for_each_entry(obj, dev_priv-mm.inactive_list, global_list)
 + list_for_each_entry(obj, dev_priv-mm.inactive_list, mm_list)
   if (obj-pin_count == 0  obj-pages_pin_count == 0)
   cnt += obj-base.size  PAGE_SHIFT;
  
 --
 1.7.9.5
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to dev_priv-dev_priv-mm.inactive_list

2013-07-05 Thread Daniel Vetter
On Fri, Jul 05, 2013 at 03:21:45PM +, Zhang, Xiong Y wrote:
 I found this issue when I read code. I don't have testcase.

Ok, merged to -fixes, thanks for the patch.
-Daniel

 
 thanks
 -Original Message-
 From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter
 Sent: Friday, July 05, 2013 9:41 PM
 To: Zhang, Xiong Y
 Cc: intel-gfx@lists.freedesktop.org
 Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Correct obj-mm_list link to 
 dev_priv-dev_priv-mm.inactive_list
 
 On Fri, Jul 05, 2013 at 06:53:29PM +0800, Xiong Zhang wrote:
  obj-mm_list link to dev_priv-mm.inactive_list/active_list
  obj-global_list link to dev_priv-mm.unbound_list/bound_list
  
  Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com
 
 Oh dear have I screwed this up.
 
 This fixes a regression introduced in
 
 commit 93927ca52a55c23e0a6a305e7e9082e8411ac9fa
 Author: Daniel Vetter daniel.vet...@ffwll.ch
 Date:   Thu Jan 10 18:03:00 2013 +0100
 
 drm/i915: Revert shrinker changes from Track unbound pages
 
 Cc: sta...@vger.kernel.org
 
 Now the big question is why none of our tests has caught this. Xiong, how 
 have you tracked down this issues? Do you perhaps have a testcase that can 
 readily reproduce this that we could add to intel-gpu-tools?
 
 Thanks, Daniel
 
  ---
   drivers/gpu/drm/i915/i915_gem.c |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/drivers/gpu/drm/i915/i915_gem.c 
  b/drivers/gpu/drm/i915/i915_gem.c index 44d890b..b6a2402 100644
  --- a/drivers/gpu/drm/i915/i915_gem.c
  +++ b/drivers/gpu/drm/i915/i915_gem.c
  @@ -4637,7 +4637,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, 
  struct shrink_control *sc)
  list_for_each_entry(obj, dev_priv-mm.unbound_list, global_list)
  if (obj-pages_pin_count == 0)
  cnt += obj-base.size  PAGE_SHIFT;
  -   list_for_each_entry(obj, dev_priv-mm.inactive_list, global_list)
  +   list_for_each_entry(obj, dev_priv-mm.inactive_list, mm_list)
  if (obj-pin_count == 0  obj-pages_pin_count == 0)
  cnt += obj-base.size  PAGE_SHIFT;
   
  --
  1.7.9.5
  
  ___
  Intel-gfx mailing list
  Intel-gfx@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/intel-gfx
 
 --
 Daniel Vetter
 Software Engineer, Intel Corporation
 +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx