Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan > 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/7/20 shenghui <crosslonelyover@xxxxxxxxx>:
> 2010/7/20 Andreas Gruenbacher <agruen@xxxxxxx>:
>
> 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}
>

And for sysctl_vfs_cache_pressure == 0 case, it's
enough to return 0 to indicate no cache entries left.



-- 


Thanks and Best Regards,
shenghui
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux