[PATCH] i915: slab shrinker have to return -1 if it can't shrink any objects

Keith Packard keithp at keithp.com
Wed Jun 29 20:53:54 PDT 2011


On Fri, 24 Jun 2011 17:03:22 +0900, KOSAKI Motohiro <kosaki.motohiro at jp.fujitsu.com> wrote:

> Now, i915_gem_inactive_shrink() should return -1 instead of 0 if it
> can't take a lock. Otherwise, vmscan is getting a lot of confusing
> because vmscan can't distinguish "can't take a lock temporary" and
> "we've shrank all of i915 objects".

This doesn't look like the cleanest change possible. I think it would be
better if the shrink function could uniformly return an error
indication so that we wouldn't need the weird looking conditional return.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110629/450e4683/attachment.pgp>


More information about the dri-devel mailing list