Re: [PATCH -mm 2/3] slab: zap kmem_cache_shrink return value

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

 



On Mon, Jan 26, 2015 at 12:26:57PM -0600, Christoph Lameter wrote:
> On Mon, 26 Jan 2015, Vladimir Davydov wrote:
> 
> > __cache_shrink() is used not only in __kmem_cache_shrink(), but also in
> > SLAB's __kmem_cache_shutdown(), where we do need its return value to
> > check if the cache is empty.
> 
> It could be useful to know if a slab is empty. So maybe leave
> kmem_cache_shrink the way it is and instead fix up slub to return the
> proper value?

Hmm, why? The return value has existed since this function was
introduced, but nobody seems to have ever used it outside the slab core.
Besides, this check is racy, so IMO we shouldn't encourage users of the
API to rely on it. That said, I believe we should drop the return value
for now. If anybody ever needs it, we can reintroduce it.

Thanks,
Vladimir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]