On Wed, 7 May 2014, Joonsoo Kim wrote: > In free_block(), if freeing object makes new free slab and number of > free_objects exceeds free_limit, we start to destroy this new free slab > with holding the kmem_cache node lock. Holding the lock is useless and, > generally, holding a lock as least as possible is good thing. I never > measure performance effect of this, but we'd be better not to hold the lock > as much as possible. > > Commented by Christoph: > This is also good because kmem_cache_free is no longer called while > holding the node lock. So we avoid one case of recursion. > > Acked-by: Christoph Lameter <cl@xxxxxxxxx> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Nice optimization. I think it could have benefited from a comment describing what the free_block() list formal is, though. -- 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>