vmscan: remove obsolete comment of shrinker
Subsystems (3)
PATCH 1/1 vmscan: remove obsolete comment of shrinker
09f363c7 fixed shrinker callback returns -1 when nr_to_scan is zero for preventing excessive the slab scanning. But 635697c6 fixed the problem, again so we can freely return -1 although nr_to_scan is zero. So let's revert 09f363c7 because the comment added in 09f363c7 made a unnecessary rule shrinker user should be aware of.
--- fs/super.c | 2 +- include/linux/shrinker.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
fs/super.c +1 -1
@@ -62,7 +62,7 @@ static int prune_super(struct shrinker *shrink, struct shrink_control *sc)return -1 ;if (!grab_super_passive (sb)) -return !sc->nr_to_scan ?0 :-1 ; +return -1 ;if (sb->s_op && sb->s_op->nr_cached_objects) fs_objects = sb->s_op->nr_cached_objects (sb);
include/linux/shrinker.h +0 -1
@@ -20,7 +20,6 @@ struct shrink_control {* 'nr_to_scan' entries and attempt to free them up. It should return * the number of objects which remain in the cache. If it returns -1, it means * it cannot do any scanning at this time (eg. there is a risk of deadlock). -* The callback must not return -1 if nr_to_scan is zero. * * The 'gfpmask' refers to the allocation we are currently trying to * fulfil.
Signature · 7 lines
1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Minchan Kim
09f363c7fixed shrinker callback returns -1 whennr_to_scanis zero for preventing excessive the slab scanning. But635697c6fixed the problem, again so we can freely return -1 althoughnr_to_scanis zero. So let's revert09f363c7because the comment added in09f363c7made a unnecessary rule shrinker user should be aware of.
Please also include the subject of the commit, not just raw hash number. ;)
For example,
09f363c7("vmscan: fix shrinker callback bug in fs/super.c") 635697c6("vmscan: fix initial shrinker size handling")
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Cong Wang
Quoted 6 lines · Minchan Kim
09f363c7fixed shrinker callback returns -1 whennr_to_scanis zero for preventing excessive the slab scanning. But635697c6fixed the problem, again so we can freely return -1 althoughnr_to_scanis zero. So let's revert09f363c7because the comment added in09f363c7made a unnecessary rule shrinker user should be aware of.
Quoted 6 lines
Please also include the subject of the commit, not just raw hash number. ;)
For example,
09f363c7("vmscan: fix shrinker callback bug in
fs/super.c") 635697c6("vmscan: fix initial shrinker size handling")
Yeb. It seems akpm handled it by himself.
But I will keep in mind.
Thanks, Cong!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>