linux/drivers/base
Lars-Peter Clausen 472fdec738 regmap: rbtree: Reduce number of nodes, take 2
Support for reducing the number of nodes and memory consumption of the rbtree
cache by allowing for small unused holes in the node's register cache block was
initially added in commit 0c7ed856 ("regmap: Cut down on the average # of nodes
in the rbtree cache"). But the commit had problems and so its effect was
reverted again in commit 4e67fb5 ("regmap: rbtree: Fix overlapping rbnodes.").
This patch brings the feature back of reducing the average number of nodes,
which will speedup node look-up, while at the same time also reducing the memory
usage of the rbtree cache. This patch takes a slightly different approach than
the original patch though. It modifies the adjacent node look-up to not only
consider nodes that are just one to the left or the right of the register but
any node that falls in a certain range around the register. The range is
calculated based on how much memory it would take to allocate a new node
compared to how much memory it takes adding a set of unused registers to an
existing node. E.g. if a node takes up 24 bytes and each register in a block
uses 1 byte the range will be from the register address - 24 to the register
address + 24. If we find a node that falls within this range it is cheaper or as
expensive to add the register to the existing node and have a couple of unused
registers in the node's cache compared to allocating a new node.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 13:32:40 +01:00
..
power Merge branch 'pm-assorted' 2013-06-28 13:01:40 +02:00
regmap regmap: rbtree: Reduce number of nodes, take 2 2013-08-29 13:32:40 +01:00
attribute_container.c drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
base.h driver/base: implement subsys_virtual_register() 2013-03-12 11:36:35 -07:00
bus.c driver core: export subsys_virtual_register 2013-05-21 09:05:52 -07:00
class.c driver-core: constify data for class_find_device() 2013-02-06 12:18:56 -08:00
core.c driver core: add default groups to struct class 2013-07-16 10:57:37 -07:00
cpu.c drivers: delete __cpuinit usage from all remaining drivers files 2013-07-14 19:36:59 -04:00
dd.c PM / Runtime: Idle devices asynchronously after probe|release 2013-04-11 12:42:52 -07:00
devres.c Linux 3.9-rc3 2013-03-17 19:40:50 -07:00
devtmpfs.c driver core: handle user namespaces properly with the uid/gid devtmpfs change 2013-04-11 11:43:29 -07:00
dma-buf.c [media] dma-buf: Cocci spatch "ptr_ret.spatch" 2013-06-08 20:00:29 -03:00
dma-coherent.c drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation 2012-10-23 14:05:32 +02:00
dma-contiguous.c drivers: cma: represent physical addresses as phys_addr_t 2012-12-11 09:28:09 +01:00
dma-mapping.c [media] dma-mapping: fix dma_common_get_sgtable() conditional compilation 2012-11-27 09:42:31 -02:00
driver.c driver core: don't trigger uevent after failure 2012-07-17 10:40:23 -07:00
firmware.c
firmware_class.c firmware loader: fix another compile warning with PM_SLEEP unset 2013-06-25 21:04:22 -07:00
hypervisor.c
init.c
isa.c
Kconfig Finally eradicate CONFIG_HOTPLUG 2013-06-03 14:20:18 -07:00
Makefile reservation: cross-device reservation support, v4 2013-06-28 12:02:15 +10:00
map.c
memory.c Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
module.c
node.c drivers/base/node.c: switch to register_hotmemory_notifier() 2013-04-29 15:54:36 -07:00
pinctrl.c drivers: pinctrl sleep and idle states in the core 2013-06-16 11:56:52 +02:00
platform.c driver-core: fix new kernel-doc warning in base/platform.c 2013-07-16 22:43:50 -07:00
reservation.c reservation: cross-device reservation support, v4 2013-06-28 12:02:15 +10:00
soc.c
syscore.c
topology.c drivers: delete __cpuinit usage from all remaining drivers files 2013-07-14 19:36:59 -04:00
transport_class.c