[lkml]   [2007]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.
On Tue, 2 Oct 2007, Yasunori Goto wrote:

> Do you mean that just nr_slabs should be checked like followings?
> I'm not sure this is enough.
> :
> if (s->node[nid]) {
> n = get_node(s, nid);
> if (!atomic_read(&n->nr_slabs)) {
> s->node[nid] = NULL;
> kmem_cache_free(kmalloc_caches, n);
> }
> }
> :
> :

That would work. But it would be better to shrink the cache first. The
first 2 slabs on a node may be empty and the shrinking will remove those.
If you do not shrink then the code may falsely assume that there are
objects on the node.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-10-02 20:33    [W:0.040 / U:2.728 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site