]> 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, 22 Sep 2011 08:26:23 +0000 (18:26 +1000)
commitf9285a0264e43f5e7253e3bc4e66d22a413e620c
tree4cf35eca7b997d3a1e1bad8a90675ed0148d5ba3
parentbc6b621cf786a6bac2c6adf598fda4a2d5be2934
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