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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>