Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Christoph Lameter
On Fri, 22 Feb 2013, Glauber Costa wrote: > On 02/22/2013 08:10 PM, Christoph Lameter wrote: > > kmem_cache_node creation runs before PARTIAL and kmem_cache runs > > after. So there would be 2 kmem_cache_node structures allocated. Ok so > > that would use cpu slabs and therefore remove pages from

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Glauber Costa
On 02/22/2013 03:15 PM, Kamezawa Hiroyuki wrote: > Tested-by: KAMEZAWA Hiroyuki I took the liberty to keep this, even with changes in the patch because I didn't change anything related to the root cause of the problem. Let me know if you object. -- To unsubscribe from this list: send the line "u

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Glauber Costa
On 02/22/2013 08:10 PM, Christoph Lameter wrote: > kmem_cache_node creation runs before PARTIAL and kmem_cache runs > after. So there would be 2 kmem_cache_node structures allocated. Ok so > that would use cpu slabs and therefore remove pages from the partial list. > Pushing that back using the flu

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Christoph Lameter
On Fri, 22 Feb 2013, Glauber Costa wrote: > At this point, we are already slab_state == PARTIAL, while > init_kmem_cache_nodes will only differentiate against slab_state == DOWN. kmem_cache_node creation runs before PARTIAL and kmem_cache runs after. So there would be 2 kmem_cache_node structures

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Glauber Costa
On 02/22/2013 07:39 PM, Christoph Lameter wrote: > On Fri, 22 Feb 2013, Glauber Costa wrote: > >> As I've mentioned in the description, the real bug is from partial slabs >> being temporarily in the cpu_slab during a recent allocation and >> therefore unreachable through the partial list. > > The

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Christoph Lameter
On Fri, 22 Feb 2013, Glauber Costa wrote: > As I've mentioned in the description, the real bug is from partial slabs > being temporarily in the cpu_slab during a recent allocation and > therefore unreachable through the partial list. The bootstrap code does not use cpu slabs but goes directly to

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Glauber Costa
On 02/22/2013 07:00 PM, Christoph Lameter wrote: > On Fri, 22 Feb 2013, Glauber Costa wrote: > >> Although not verified in practice, I also point out that it is not safe to >> scan >> the full list only when debugging is on in this case. As unlikely as it is, >> it >> is theoretically possible f

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Christoph Lameter
On Fri, 22 Feb 2013, Glauber Costa wrote: > Although not verified in practice, I also point out that it is not safe to > scan > the full list only when debugging is on in this case. As unlikely as it is, it > is theoretically possible for the pages to be full. If they are, they will > become unre

Re: [PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Kamezawa Hiroyuki
(2013/02/22 19:30), Glauber Costa wrote: > 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 f

[PATCH] slub: correctly bootstrap boot caches

2013-02-22 Thread Glauber Costa
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 page