Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-29 Thread Zhihui Zhang
I see your point. Thanks. -Zhihui On Wed, Oct 29, 2014 at 12:18 AM, Tejun Heo wrote: > Plesae restore lkml cc when replying. > > On Tue, Oct 28, 2014 at 08:12:30PM -0400, Zhihui Zhang wrote: >> My patch just increases the dynamic area in the first chunk slightly >> to cover the round up surplus.

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-27 Thread Tejun Heo
On Mon, Oct 27, 2014 at 07:32:47PM -0400, Zhihui Zhang wrote: > I am trying to make each CPU to have a full unit size in the first > chunk, same as in all other chunks. Does this make sense? And why are you trying to do that? Unit size may be highly variable. Why would it make sense to reserve me

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-27 Thread Zhihui Zhang
In pcpu_embed_first_chunk(), we allocate full unit size for each CPU in the first chunk: 1981 /* allocate space for the whole group */ 1982 ptr = alloc_fn(cpu, gi->nr_units * ai->unit_size, atom_size); 1983 if (!ptr) { 1984 rc

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-27 Thread Tejun Heo
On Sat, Oct 25, 2014 at 11:05:58AM -0400, Zhihui Zhang wrote: > Since we have already allocated the full unit size for the first chunk, we > might as well use > it so that the unit size are the same for all chunks. The page first chunk > allocator already > has this effect because it allocates on

[PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-25 Thread Zhihui Zhang
Since we have already allocated the full unit size for the first chunk, we might as well use it so that the unit size are the same for all chunks. The page first chunk allocator already has this effect because it allocates one page at a time. Signed-off-by: Zhihui Zhang --- mm/percpu.c | 6 +++