From: Lai Jiangshan Date: Thu, 22 May 2014 00:44:09 +0000 (+1000) Subject: idr: reorder the fields X-Git-Tag: next-20140530~2^2~47 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0bfb6d6f597820de6e1a918b83f516a49e7dce0d;p=karo-tx-linux.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 --- diff --git a/include/linux/idr.h b/include/linux/idr.h index 6af3400b9b2f..013fd9bc4cb6 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<