Re: [PATCH 4/4] slab: Use for_each_kmem_cache_node function
From: Christoph Lameter <cl@gentwo.org>
Date: 2014-06-02 15:45:05
On Mon, 2 Jun 2014, Joonsoo Kim wrote:
There are some other places that we can replace such as get_slabinfo(), leaks_show(), etc.. If you want to replace for_each_online_node() with for_each_kmem_cache_node, please also replace them.
Ok we can do that.
Meanwhile, I think that this change is not good for readability. There are many for_each_online_node() usage that we can't replace, so I don't think this abstraction is really helpful clean-up. Possibly, using for_each_online_node() consistently would be more readable than this change.
What really matters is that we have a management structure kmem_cache_node for the relevant node. There are portions during bootstrap when kmem_cache_node is not allocated. Using this function also avoids race conditions during node bringup and teardown. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>