2010/7/20 Andreas Gruenbacher <agruen@xxxxxxx>: > On Sunday 18 July 2010 08:36:59 Wang Sheng-Hui wrote: >> I regenerated the patch. Please check it. > > The logic for calculating how many objects to free is still wrong: > mb_cache_shrink_fn returns the number of entries scaled by > sysctl_vfs_cache_pressure / 100. It should also scale nr_to_scan by the > inverse of that. The sysctl_vfs_cache_pressure == 0 case (never scale) may > require special attention. > > See dcache_shrinker() in fs/dcache.c. > > Thanks, > Andreas > Sorry, I haven't found any special attention on sysctl_vfs_cache_pressure == 0 case or scale nr_to_scan in fs/dcache.c 900static int shrink_dcache_memory(int nr, gfp_t gfp_mask) 901{ 902 if (nr) { 903 if (!(gfp_mask & __GFP_FS)) 904 return -1; 905 prune_dcache(nr); 906 } 907 return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure; 908} -- Thanks and Best Regards, shenghui -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html