]> 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>
Fri, 9 Sep 2011 06:16:14 +0000 (16:16 +1000)
commit60f1396697ba97927f2ba318f04f9471d56a5f8e
treed791a52ec067c2c4374a63f709f77d5d7d845e12
parentff2ed1b204035632c3f00331dfdc105af85364f6
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