]> git.karo-electronics.de Git - karo-tx-linux.git/commit
A shrinker function can return -1, means that it cannot do anything
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Wed, 24 Aug 2011 23:47:07 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Sep 2011 05:16:12 +0000 (15:16 +1000)
commit824d5bb51632cc28a02ef87c3e2b4fdc71f268e3
tree1974b16c2519fc3cc6c54fa589f0a360e8e61c94
parent5dd0dd2c48b3b145fec5713f4a44e99ecfb45f4b
A shrinker function can return -1, means that it cannot do anything
without a risk of deadlock.  For example prune_super() does this if it
cannot grab a superblock refrence, even if nr_to_scan=0.  Currently we
interpret this -1 as a ULONG_MAX size shrinker and evaluate `total_scan'
according to this.  So the next time around this shrinker can cause really
big pressure.  Let's skip such shrinkers instead.

Also make total_scan signed, otherwise the check (total_scan < 0) below
never works.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c