]> git.baikalelectronics.ru Git - kernel.git/commit
slub: correctly bootstrap boot caches
authorGlauber Costa <glommer@parallels.com>
Fri, 22 Feb 2013 16:20:00 +0000 (20:20 +0400)
committerPekka Enberg <penberg@kernel.org>
Thu, 28 Feb 2013 07:29:38 +0000 (09:29 +0200)
commit0ad85f9b9c5a1a154610e28f48bb1ad354603904
treef1582b8912fe77bac85dc0e1cbac44acab1a7e7a
parent6188d2a8bfa9a9bbdeb50e1fb6d93dcae4eb04ce
slub: correctly bootstrap boot caches

After we create a boot cache, we may allocate from it until it is bootstraped.
This will move the page from the partial list to the cpu slab list. If this
happens, the loop:

list_for_each_entry(p, &n->partial, lru)

that we use to scan for all partial pages will yield nothing, and the pages
will keep pointing to the boot cpu cache, which is of course, invalid. To do
that, we should flush the cache to make sure that the cpu slab is back to the
partial list.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Reported-by: Steffen Michalke <StMichalke@web.de>
Tested-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c