[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1405071801040.1128@chino.kir.corp.google.com>
Date: Wed, 7 May 2014 18:01:50 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Joonsoo Kim <iamjoonsoo.kim@....com>
cc: Pekka Enberg <penberg@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Joonsoo Kim <js1304@...il.com>
Subject: Re: [PATCH v2 04/10] slab: defer slab_destroy in free_block()
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@...ux.com>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
Acked-by: David Rientjes <rientjes@...gle.com>
Nice optimization. I think it could have benefited from a comment
describing what the free_block() list formal is, though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists