Re: [REGRESSION] [FIXED] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-10-01 Thread Joonsoo Kim
On Mon, Sep 29, 2014 at 10:03:15AM -0700, Jeremiah Mahler wrote: > Joonsoo, > > On Mon, Sep 29, 2014 at 04:44:18PM +0900, Joonsoo Kim wrote: > > On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: > > > On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: > > > > Because of

Re: [REGRESSION] [FIXED] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-10-01 Thread Joonsoo Kim
On Mon, Sep 29, 2014 at 10:03:15AM -0700, Jeremiah Mahler wrote: Joonsoo, On Mon, Sep 29, 2014 at 04:44:18PM +0900, Joonsoo Kim wrote: On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: Because of chicken and

Re: [REGRESSION] [FIXED] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-29 Thread Jeremiah Mahler
Joonsoo, On Mon, Sep 29, 2014 at 04:44:18PM +0900, Joonsoo Kim wrote: > On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: > > On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: > > > Because of chicken and egg problem, initializaion of SLAB is really > > > complicated. We

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-29 Thread Joonsoo Kim
On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: > On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: > > Because of chicken and egg problem, initializaion of SLAB is really > > complicated. We need to allocate cpu cache through SLAB to make > > the kmem_cache works, but,

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-29 Thread Joonsoo Kim
On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: Because of chicken and egg problem, initializaion of SLAB is really complicated. We need to allocate cpu cache through SLAB to make the kmem_cache works, but, before

Re: [REGRESSION] [FIXED] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-29 Thread Jeremiah Mahler
Joonsoo, On Mon, Sep 29, 2014 at 04:44:18PM +0900, Joonsoo Kim wrote: On Sat, Sep 27, 2014 at 11:24:49PM -0700, Jeremiah Mahler wrote: On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: Because of chicken and egg problem, initializaion of SLAB is really complicated. We need to

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Jeremiah Mahler
On Sun, Sep 28, 2014 at 11:38:51AM -0500, Christoph Lameter wrote: > On Sat, 27 Sep 2014, Jeremiah Mahler wrote: > > > I just encountered a problem on a Lenovo Carbon X1 where it will > > suspend but won't resume. A bisect indicated that this patch > > is causing the problem. > > Could you

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Christoph Lameter
On Sat, 27 Sep 2014, Jeremiah Mahler wrote: > I just encountered a problem on a Lenovo Carbon X1 where it will > suspend but won't resume. A bisect indicated that this patch > is causing the problem. Could you please not quote the whole patch. Took me a while to find what you were saying. >

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Jeremiah Mahler
On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: > Because of chicken and egg problem, initializaion of SLAB is really > complicated. We need to allocate cpu cache through SLAB to make > the kmem_cache works, but, before initialization of kmem_cache, > allocation through SLAB is

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Jeremiah Mahler
On Thu, Aug 21, 2014 at 05:11:13PM +0900, Joonsoo Kim wrote: Because of chicken and egg problem, initializaion of SLAB is really complicated. We need to allocate cpu cache through SLAB to make the kmem_cache works, but, before initialization of kmem_cache, allocation through SLAB is

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Christoph Lameter
On Sat, 27 Sep 2014, Jeremiah Mahler wrote: I just encountered a problem on a Lenovo Carbon X1 where it will suspend but won't resume. A bisect indicated that this patch is causing the problem. Could you please not quote the whole patch. Took me a while to find what you were saying.

Re: [REGRESSION] [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-09-28 Thread Jeremiah Mahler
On Sun, Sep 28, 2014 at 11:38:51AM -0500, Christoph Lameter wrote: On Sat, 27 Sep 2014, Jeremiah Mahler wrote: I just encountered a problem on a Lenovo Carbon X1 where it will suspend but won't resume. A bisect indicated that this patch is causing the problem. Could you please not

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-31 Thread Joonsoo Kim
On Wed, Aug 27, 2014 at 06:37:33PM -0500, Christoph Lameter wrote: > One minor nit. Otherwise > > Acked-by: Christoph Lameter > > On Thu, 21 Aug 2014, Joonsoo Kim wrote: > > > @@ -2041,56 +1982,63 @@ static size_t calculate_slab_order(struct > > kmem_cache *cachep, > > return left_over; >

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-31 Thread Joonsoo Kim
On Wed, Aug 27, 2014 at 06:37:33PM -0500, Christoph Lameter wrote: One minor nit. Otherwise Acked-by: Christoph Lameter c...@linux.com On Thu, 21 Aug 2014, Joonsoo Kim wrote: @@ -2041,56 +1982,63 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, return left_over;

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-27 Thread Christoph Lameter
One minor nit. Otherwise Acked-by: Christoph Lameter On Thu, 21 Aug 2014, Joonsoo Kim wrote: > @@ -2041,56 +1982,63 @@ static size_t calculate_slab_order(struct kmem_cache > *cachep, > return left_over; > } > > +static int alloc_kmem_cache_cpus(struct kmem_cache *cachep, int entries, >

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-27 Thread Christoph Lameter
One minor nit. Otherwise Acked-by: Christoph Lameter c...@linux.com On Thu, 21 Aug 2014, Joonsoo Kim wrote: @@ -2041,56 +1982,63 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, return left_over; } +static int alloc_kmem_cache_cpus(struct kmem_cache *cachep, int

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-26 Thread Christoph Lameter
On Tue, 26 Aug 2014, Joonsoo Kim wrote: > > What case? SLUB uses a linked list and therefore does not have these > > storage requirements. > > I misunderstand that you mentioned just memory usage. My *any case* > means memory usage of previous SLAB and SLAB with this percpu alloc > change. Sorry

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-26 Thread Christoph Lameter
On Tue, 26 Aug 2014, Joonsoo Kim wrote: What case? SLUB uses a linked list and therefore does not have these storage requirements. I misunderstand that you mentioned just memory usage. My *any case* means memory usage of previous SLAB and SLAB with this percpu alloc change. Sorry for

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Joonsoo Kim
On Mon, Aug 25, 2014 at 08:13:58AM -0500, Christoph Lameter wrote: > On Mon, 25 Aug 2014, Joonsoo Kim wrote: > > > On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: > > > On Thu, 21 Aug 2014, Joonsoo Kim wrote: > > > > > > > So, this patch try to use percpu allocator in SLAB.

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Christoph Lameter
On Mon, 25 Aug 2014, Joonsoo Kim wrote: > On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: > > On Thu, 21 Aug 2014, Joonsoo Kim wrote: > > > > > So, this patch try to use percpu allocator in SLAB. This simplify > > > initialization step in SLAB so that we could maintain SLAB

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Joonsoo Kim
On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: > On Thu, 21 Aug 2014, Joonsoo Kim wrote: > > > So, this patch try to use percpu allocator in SLAB. This simplify > > initialization step in SLAB so that we could maintain SLAB code more > > easily. > > I thought about this a

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Joonsoo Kim
On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: On Thu, 21 Aug 2014, Joonsoo Kim wrote: So, this patch try to use percpu allocator in SLAB. This simplify initialization step in SLAB so that we could maintain SLAB code more easily. I thought about this a couple of

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Christoph Lameter
On Mon, 25 Aug 2014, Joonsoo Kim wrote: On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: On Thu, 21 Aug 2014, Joonsoo Kim wrote: So, this patch try to use percpu allocator in SLAB. This simplify initialization step in SLAB so that we could maintain SLAB code more

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-25 Thread Joonsoo Kim
On Mon, Aug 25, 2014 at 08:13:58AM -0500, Christoph Lameter wrote: On Mon, 25 Aug 2014, Joonsoo Kim wrote: On Thu, Aug 21, 2014 at 09:21:30AM -0500, Christoph Lameter wrote: On Thu, 21 Aug 2014, Joonsoo Kim wrote: So, this patch try to use percpu allocator in SLAB. This simplify

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-21 Thread Christoph Lameter
On Thu, 21 Aug 2014, Joonsoo Kim wrote: > So, this patch try to use percpu allocator in SLAB. This simplify > initialization step in SLAB so that we could maintain SLAB code more > easily. I thought about this a couple of times but the amount of memory used for the per cpu arrays can be huge. In

[PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-21 Thread Joonsoo Kim
Because of chicken and egg problem, initializaion of SLAB is really complicated. We need to allocate cpu cache through SLAB to make the kmem_cache works, but, before initialization of kmem_cache, allocation through SLAB is impossible. On the other hand, SLUB does initialization with more simple

[PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-21 Thread Joonsoo Kim
Because of chicken and egg problem, initializaion of SLAB is really complicated. We need to allocate cpu cache through SLAB to make the kmem_cache works, but, before initialization of kmem_cache, allocation through SLAB is impossible. On the other hand, SLUB does initialization with more simple

Re: [PATCH 1/3] mm/slab: use percpu allocator for cpu cache

2014-08-21 Thread Christoph Lameter
On Thu, 21 Aug 2014, Joonsoo Kim wrote: So, this patch try to use percpu allocator in SLAB. This simplify initialization step in SLAB so that we could maintain SLAB code more easily. I thought about this a couple of times but the amount of memory used for the per cpu arrays can be huge. In