slab: factor out calculate nr objects in cache_estimate
This logic is not simple to understand so that making separate function helping readability. Additionally, we can use this change in the following patch which implement for freelist to have another sized index in according to nr objects. Acked-by: NChristoph Lameter <cl@linux.com> Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: NPekka Enberg <penberg@kernel.org>
Showing
想要评论请 注册 或 登录