]> git.baikalelectronics.ru Git - kernel.git/commit
slub: avoid duplicate creation on the first object
authorWei Yang <weiyang@linux.vnet.ibm.com>
Wed, 6 Aug 2014 23:04:42 +0000 (16:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:15 +0000 (18:01 -0700)
commit9654dbe8449115b8b9e718d5fa8e149a128f436c
treec3fc54c3c86b0ff0d06f244baadada4f7d0dd2a3
parent158a2d7a7d55216e66849960345708c56eceaac9
slub: avoid duplicate creation on the first object

When a kmem_cache is created with ctor, each object in the kmem_cache
will be initialized before ready to use.  While in slub implementation,
the first object will be initialized twice.

This patch reduces the duplication of initialization of the first
object.

Fix commit b90c285a ("SLUB: add macros for scanning objects in a slab").

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c