Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-03 Thread Yasunori Goto
> On Wed, 3 Oct 2007, Yasunori Goto wrote: > > > > > > > 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 > > > objec

Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-03 Thread Christoph Lameter
On Wed, 3 Oct 2007, Yasunori Goto wrote: > > > > 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

Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-03 Thread Yasunori Goto
> 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; >

Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-02 Thread Christoph Lameter
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; >

Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-01 Thread Yasunori Goto
> On Mon, 1 Oct 2007, Yasunori Goto wrote: > > > +#ifdef CONFIG_MEMORY_HOTPLUG > > +static void __slab_callback_offline(int nid) > > +{ > > + struct kmem_cache_node *n; > > + struct kmem_cache *s; > > + > > + list_for_each_entry(s, &slab_caches, list) { > > + if (s->node[nid]) { >

Re: [Patch / 002](memory hotplug) Callback function to create kmem_cache_node.

2007-10-01 Thread Christoph Lameter
On Mon, 1 Oct 2007, Yasunori Goto wrote: > +#ifdef CONFIG_MEMORY_HOTPLUG > +static void __slab_callback_offline(int nid) > +{ > + struct kmem_cache_node *n; > + struct kmem_cache *s; > + > + list_for_each_entry(s, &slab_caches, list) { > + if (s->node[nid]) { > +