Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread JoonSoo Kim
2012/8/25 Christoph Lameter : > On Sat, 25 Aug 2012, JoonSoo Kim wrote: > >> But, when using "cpu_partial_objects", I have a coding style problem. >> >> if (kmem_cache_debug(s) >> || cpu_slab_objects + cpu_partial_objects >>

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Christoph Lameter
On Sat, 25 Aug 2012, JoonSoo Kim wrote: > But, when using "cpu_partial_objects", I have a coding style problem. > > if (kmem_cache_debug(s) > || cpu_slab_objects + cpu_partial_objects > > s->max_cpu_object /

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread JoonSoo Kim
2012/8/25 Christoph Lameter : > On Sat, 25 Aug 2012, Joonsoo Kim wrote: > >> index d597530..c96e0e4 100644 >> --- a/mm/slub.c >> +++ b/mm/slub.c >> @@ -1538,6 +1538,7 @@ static void *get_partial_node(struct kmem_cache *s, >> { >> struct page *page, *page2; >> void *object = NULL; >> +

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Christoph Lameter
On Sat, 25 Aug 2012, Joonsoo Kim wrote: > index d597530..c96e0e4 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -1538,6 +1538,7 @@ static void *get_partial_node(struct kmem_cache *s, > { > struct page *page, *page2; > void *object = NULL; > + int cpu_slab_objects = 0, pobjects =

[PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Joonsoo Kim
In get_partial_node(), we want to refill cpu slab and cpu partial slabs until the number of object kept in the per cpu slab and cpu partial lists of a processor is reached to max_cpu_object. However, in current implementation, it is not achieved. See following code in get_partial_node(). if

[PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Joonsoo Kim
In get_partial_node(), we want to refill cpu slab and cpu partial slabs until the number of object kept in the per cpu slab and cpu partial lists of a processor is reached to max_cpu_object. However, in current implementation, it is not achieved. See following code in get_partial_node(). if

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Christoph Lameter
On Sat, 25 Aug 2012, Joonsoo Kim wrote: index d597530..c96e0e4 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1538,6 +1538,7 @@ static void *get_partial_node(struct kmem_cache *s, { struct page *page, *page2; void *object = NULL; + int cpu_slab_objects = 0, pobjects = 0; We

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread JoonSoo Kim
2012/8/25 Christoph Lameter c...@linux.com: On Sat, 25 Aug 2012, Joonsoo Kim wrote: index d597530..c96e0e4 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1538,6 +1538,7 @@ static void *get_partial_node(struct kmem_cache *s, { struct page *page, *page2; void *object = NULL; +

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread Christoph Lameter
On Sat, 25 Aug 2012, JoonSoo Kim wrote: But, when using cpu_partial_objects, I have a coding style problem. if (kmem_cache_debug(s) || cpu_slab_objects + cpu_partial_objects s-max_cpu_object / 2) Do

Re: [PATCH 2/2] slub: correct the calculation of the number of cpu objects in get_partial_node

2012-08-24 Thread JoonSoo Kim
2012/8/25 Christoph Lameter c...@linux.com: On Sat, 25 Aug 2012, JoonSoo Kim wrote: But, when using cpu_partial_objects, I have a coding style problem. if (kmem_cache_debug(s) || cpu_slab_objects + cpu_partial_objects