On Mon, Nov 27, 2017 at 09:37:30AM +0800, Jiang Biao wrote:> > > > This patch make do_shrink_slab more robust when > > shrinker->count_objects return negative freeable. > > Shrinker.h says count_objects should return 0 if there are no > freeable objects, not -1. > > So if something returns -1, changing it with returning 0 would > be more proper fix. > Hi, Indeed it's not a bug of vmscan, but there are many shrinkers out there, which may return negative value unwillingly(in some rare cases, such as decreasing cocurrently). It's unlikely and should be avioded, but not impossible, this patch may make it more robust and could not hurt :). Thanks. Regards,