Subject: + drm-i915-fix-up-usage-of-shrink_stop.patch added to -mm tree To: daniel.vetter@xxxxxxxx,Knut_Petersen@xxxxxxxxxxx,david@xxxxxxxxxxxxx,glommer@xxxxxxxxx,glommer@xxxxxxxxxx,hannes@xxxxxxxxxxx,mgorman@xxxxxxx,mhocko@xxxxxxx,riel@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 25 Sep 2013 12:54:43 -0700 The patch titled Subject: drm/i915: Fix up usage of SHRINK_STOP has been added to the -mm tree. Its filename is drm-i915-fix-up-usage-of-shrink_stop.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drm-i915-fix-up-usage-of-shrink_stop.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drm-i915-fix-up-usage-of-shrink_stop.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Daniel Vetter <daniel.vetter@xxxxxxxx> Subject: drm/i915: Fix up usage of SHRINK_STOP In commit 81e49f811404f428a9d9a63295a0c267e802fa12 Author: Glauber Costa <glommer@xxxxxxxxxx> Date: Wed Aug 28 10:18:13 2013 +1000 i915: bail out earlier when shrinker cannot acquire mutex SHRINK_STOP was added to tell the core shrinker code to bail out and go to the next shrinker since the i915 shrinker couldn't acquire required locks. But the SHRINK_STOP return code was added to the ->count_objects callback and not the ->scan_objects callback as it should have been, resulting in tons of dmesg noise like shrink_slab: i915_gem_inactive_scan+0x0/0x9c negative objects to delete nr=-xxxxxxxxx Fix discusssed with Dave Chinner. References: http://www.spinics.net/lists/intel-gfx/msg33597.html Reported-by: Knut Petersen <Knut_Petersen@xxxxxxxxxxx> Cc: Knut Petersen <Knut_Petersen@xxxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Glauber Costa <glommer@xxxxxxxxxx> Cc: Glauber Costa <glommer@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/gpu/drm/i915/i915_gem.c~drm-i915-fix-up-usage-of-shrink_stop drivers/gpu/drm/i915/i915_gem.c --- a/drivers/gpu/drm/i915/i915_gem.c~drm-i915-fix-up-usage-of-shrink_stop +++ a/drivers/gpu/drm/i915/i915_gem.c @@ -4800,10 +4800,10 @@ i915_gem_inactive_count(struct shrinker if (!mutex_trylock(&dev->struct_mutex)) { if (!mutex_is_locked_by(&dev->struct_mutex, current)) - return SHRINK_STOP; + return 0; if (dev_priv->mm.shrinker_no_lock_stealing) - return SHRINK_STOP; + return 0; unlock = false; } @@ -4901,10 +4901,10 @@ i915_gem_inactive_scan(struct shrinker * if (!mutex_trylock(&dev->struct_mutex)) { if (!mutex_is_locked_by(&dev->struct_mutex, current)) - return 0; + return SHRINK_STOP; if (dev_priv->mm.shrinker_no_lock_stealing) - return 0; + return SHRINK_STOP; unlock = false; } _ Patches currently in -mm which might be from daniel.vetter@xxxxxxxx are drm-i915-fix-up-usage-of-shrink_stop.patch drm-fb-helper-dont-sleep-for-screen-unblank-when-an-oopps-is-in-progress.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html