pcpu_unit_size exactly equals to ai->unit_size. This patch assign this value instead of calculating from pcpu_unit_pages. Also it reorder them to make it looks more friendly to audience. Signed-off-by: Wei Yang <weiyang@xxxxxxxxxxxxxxxxxx> --- mm/percpu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 4f710a4f..74677e0 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1300,8 +1300,8 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, pcpu_unit_offsets = unit_off; /* determine basic parameters */ - pcpu_unit_pages = ai->unit_size >> PAGE_SHIFT; - pcpu_unit_size = pcpu_unit_pages << PAGE_SHIFT; + pcpu_unit_size = ai->unit_size; + pcpu_unit_pages = pcpu_unit_size >> PAGE_SHIFT; pcpu_atom_size = ai->atom_size; pcpu_chunk_struct_size = sizeof(struct pcpu_chunk) + BITS_TO_LONGS(pcpu_unit_pages) * sizeof(unsigned long); -- 1.7.5.4 -- 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>