]> git.kernelconcepts.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>
Thu, 15 Sep 2011 06:21:27 +0000 (16:21 +1000)
commitf4fc4f2571a621aa019da035a945a1ddb76240f2
tree0112cd3de1b3cdb07fc80998a446204a459a573c
parent74b3ddb669cdfb348a88b47a09da8a750f52de09
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