On Mon, Jul 20, 2015 at 10:55:29PM +0800, Baoquan He wrote:
> In pcpu_setup_first_chunk() pcpu_reserved_chunk is assigned to point to
> static chunk. While pcpu_first_chunk is got from below code:
> 
>       pcpu_first_chunk = dchunk ?: schunk;
> 
> Then it could point to static chunk too if dynamic chunk doesn't exist. So
> in this patch adding a check in percpu_init_late() to see if pcpu_first_chunk
> is equal to pcpu_reserved_chunk. Only if they are not equal we add
> pcpu_reserved_chunk to the target array.

So, I don't think this is actually possible.  dyn_size can't be zero
so if reserved chunk is created, dyn chunk is also always created and
thus first chunk can't equal reserved chunk.  It might be useful to
add some comments explaining this or maybe WARN_ON() but I don't think
this path is necessary.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to