From: Lai Jiangshan Date: Fri, 6 Jun 2014 21:37:15 +0000 (-0700) Subject: idr: reorder the fields X-Git-Tag: v3.16-rc1~82^2~4^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcbff5d1effbbd52be1ed9f2efb6c8d0445ad188;p=platform%2Fkernel%2Flinux-exynos.git idr: reorder the fields idr_layer->layer is always accessed in read path, move it in the front. idr_layer->bitmap is moved on the bottom. And rcu_head shares with bitmap due to they do not be accessed at the same time. idr->id_free/id_free_cnt/lock are free list fields, and moved to the bottom. They will be removed in near future. Signed-off-by: Lai Jiangshan Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/idr.h b/include/linux/idr.h index 6af3400..013fd9b 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -29,21 +29,24 @@ struct idr_layer { int prefix; /* the ID prefix of this idr_layer */ - DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */ + int layer; /* distance from leaf */ struct idr_layer __rcu *ary[1<