diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2013-03-15 14:54:35 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 21:38:15 +0000 |
commit | 0c7ed8563a0282c032936ae1c667498d59691593 (patch) | |
tree | 9c526d8d5cb5ecf4514d93be8071a1ecb66e6389 /drivers/base/regmap/internal.h | |
parent | 584de329ca43cc6d73eb74885e1d5d9fc0549423 (diff) | |
download | linux-stable-0c7ed8563a0282c032936ae1c667498d59691593.tar.gz linux-stable-0c7ed8563a0282c032936ae1c667498d59691593.tar.bz2 linux-stable-0c7ed8563a0282c032936ae1c667498d59691593.zip |
regmap: Cut down on the average # of nodes in the rbtree cache
This patch aims to bring down the average number of nodes
in the rbtree cache and increase the average number of registers
per node. This should improve general lookup and traversal times.
This is achieved by setting the minimum size of a block within the
rbnode to the size of the rbnode itself. This will essentially
cache possibly non-existent registers so to combat this scenario,
we keep a separate bitmap in memory which keeps track of which register
exists. The memory overhead of this change is likely in the order of
~5-10%, possibly less depending on the register file layout. On my test
system with a bitmap of ~4300 bits and a relatively sparse register
layout, the memory requirements for the entire cache did not increase
(the cutting down of nodes which was about 50% of the original number
compensated the situation).
A second patch that can be built on top of this can look at the
ratio `sizeof(*rbnode) / map->cache_word_size' in order to suitably
adjust the block length of each block.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/internal.h')
0 files changed, 0 insertions, 0 deletions