Re: [PATCH 2/3] slub: Use new node functions

David Rientjes
2014-06-17T21:47:21Z

On Fri, 13 Jun 2014, Christoph Lameter wrote:

> On Wed, 11 Jun 2014, David Rientjes wrote:
>
> > > + for_each_kmem_cache_node(s, node, n) {
> > >
> > > free_partial(s, n);
> > > if (n->nr_partial || slabs_node(s, node))
> >
> > Newline not removed?
>
> Ok got through the file and removed all the lines after
> for_each_kmem_cache_node.
>
> >
> > > @@ -3407,11 +3401,7 @@ int __kmem_cache_shrink(struct kmem_cach
> > > return -ENOMEM;
> > >
> > > flush_all(s);
> > > - for_each_node_state(node, N_NORMAL_MEMORY) {
> > > - n = get_node(s, node);
> > > -
> > > - if (!n->nr_partial)
> > > - continue;
> > > + for_each_kmem_cache_node(s, node, n) {
> > >
> > > for (i = 0; i < objects; i++)
> > > INIT_LIST_HEAD(slabs_by_inuse + i);
> >
> > Is there any reason not to keep the !n->nr_partial check to avoid taking
> > n->list_lock unnecessarily?
>
> No this was simply a mistake the check needs to be preserved.
>
>
> Subject: slub: Fix up earlier patch
>
> Signed-off-by: Christoph Lameter <cl@linux.com>

Thanks!

Acked-by: David Rientjes <rientjes@google.com>

as merged in -mm.