linux-stable/drivers
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
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi Revert "ACPI / video: Always call acpi_video_init_brightness() on init" 2013-08-22 23:39:02 +02:00
amba
ata sata_fsl: save irqs while coalescing 2013-08-20 08:38:23 -04:00
atm
auxdisplay
base regmap: rbtree: Reduce number of nodes, take 2 2013-08-29 13:32:40 +01:00
bcma
block aoe: adjust ref of head for compound page tails 2013-08-13 17:57:48 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-07-31 15:11:50 -04:00
bus ARM SoC device tree changes 2013-07-02 14:23:01 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-03 16:07:25 -07:00
char More virtio console fixes than I'm happy with, but all real issues, 2013-08-08 09:32:20 -07:00
clk clk: exynos4: Add CLK_GET_RATE_NOCACHE flag for the Exynos4x12 ISP clocks 2013-08-13 10:01:56 -07:00
clocksource clocksource+irqchip: delete __cpuinit usage from all related files 2013-07-14 19:36:57 -04:00
connector
cpufreq cpufreq: rename ignore_nice as ignore_nice_load 2013-08-07 22:25:06 +02:00
cpuidle Revert "cpuidle: Quickly notice prediction failure for repeat mode" 2013-07-29 13:32:29 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-07-24 11:05:18 -07:00
dca
devfreq Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
dio
dma ARM: SoC fixes for v3.11-rc 2013-08-08 09:28:08 -07:00
edac EDAC: Fix lockdep splat 2013-07-23 16:01:28 -07:00
eisa
extcon drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
firewire firewire: fix libdc1394/FlyCap2 iso event regression 2013-07-27 20:24:36 +02:00
firmware dmi_scan: add comments on dmi_present() and the loop in dmi_scan_machine() 2013-07-31 14:41:02 -07:00
fmc
gpio gpio_msm: Fix build error due to missing err.h 2013-07-31 00:34:31 +02:00
gpu Merge tag 'drm-intel-fixes-2013-08-23' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes 2013-08-23 18:52:37 +10:00
hid Revert "HID: hid-logitech-dj: querying_devices was never set" 2013-08-09 11:34:19 +02:00
hsi drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
hv Drivers: hv: balloon: Do not post pressure status if interrupted 2013-07-16 23:19:19 -07:00
hwmon hwmon: (adt7470) Fix incorrect return code check 2013-08-08 12:43:07 -07:00
hwspinlock
i2c i2c: Fix Kontron PLD prescaler calculation 2013-08-05 10:31:18 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2013-07-10 18:15:41 -07:00
idle
iio iio: adjd_s311: Fix non-scan mode data read 2013-08-19 19:30:21 +01:00
infiniband Merge branches 'cma', 'cxgb3', 'cxgb4', 'ipoib', 'misc', 'mlx4', 'mlx5', 'nes', 'ocrdma' and 'qib' into for-next 2013-07-31 14:24:06 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-07-13 18:05:13 -07:00
iommu IOMMU Updates for Linux 3.11 2013-07-10 14:46:40 -07:00
ipack
irqchip clocksource+irqchip: delete __cpuinit usage from all related files 2013-07-14 19:36:57 -04:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
leds leds: mc13783: Fix "uninitialized variable" warning 2013-07-02 08:44:02 -07:00
lguest Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-07-04 11:40:58 -07:00
macintosh powerpc/windfarm: Fix noisy slots-fan on Xserve (rm31) 2013-08-01 13:11:47 +10:00
mailbox
md dm cache: avoid conflicting remove_mapping() in mq policy 2013-08-16 15:56:51 -04:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-08-09 15:04:09 -07:00
memory
memstick drivers/memstick/host/r592.c: convert to module_pci_driver 2013-07-03 16:08:06 -07:00
message drivers: avoid format strings in names passed to alloc_workqueue() 2013-07-03 16:07:41 -07:00
mfd For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
misc Char/Misc patches for 3.11-rc3 2013-07-26 11:36:12 -07:00
mmc ARM: pxa: propagate errors from regulator_enable() to pxamci 2013-07-23 12:15:15 -07:00
mtd A couple of fixes and clean-ups, allow for assigning user-defined 2013-07-05 12:09:48 -07:00
net be2net: fix disabling TX in be_close() 2013-08-22 19:58:23 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
ntb
nubus
of of: fdt: fix memory initialization for expanded DT 2013-08-21 20:05:49 -05:00
oprofile drivers: delete __cpuinit usage from all remaining drivers files 2013-07-14 19:36:59 -04:00
parisc parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
parport Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
pci ACPI: Try harder to resolve _ADR collisions for bridges 2013-08-07 22:55:00 +02:00
pcmcia Driver core patches for 3.11-rc1 2013-07-02 11:44:19 -07:00
pinctrl pinctrl: sunxi: Add spinlocks 2013-08-07 21:57:17 +02:00
platform Merge branch 'akpm' (patches from Andrew Morton) 2013-08-23 09:52:32 -07:00
pnp PNP / ACPI: avoid garbage in resource name 2013-07-18 01:38:59 +02:00
power Nothing exciting this time, just assorted fixes and cleanups. 2013-07-10 11:13:00 -07:00
pps pps-gpio: add device-tree binding and support 2013-07-03 16:08:06 -07:00
ps3
ptp
pwm
rapidio rapidio: fix use after free in rio_unregister_scan() 2013-07-31 14:41:02 -07:00
regulator For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
remoteproc Trivial remoteproc fixes by Suman Anna, Wei Yongjun and Thomas Meyer. 2013-07-11 12:35:09 -07:00
reset
rpmsg
rtc drivers/rtc/rtc-stmp3xxx.c: provide timeout for potentially endless loop polling a HW bit 2013-08-13 17:57:48 -07:00
s390 [SCSI] zfcp: remove access control tables interface (keep sysfs files) 2013-08-22 09:26:51 -07:00
sbus
scsi [SCSI] lpfc: Don't force CONFIG_GENERIC_CSUM on 2013-08-21 10:54:20 -07:00
sfi
sh Merge branch 'pm-assorted' 2013-06-28 13:01:40 +02:00
sn
spi spi: spi-davinci: Fix direction in dma_map_single() 2013-07-29 20:27:54 +01:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
staging staging: comedi: bug-fix NULL pointer dereference on failed attach 2013-08-23 10:31:47 -07:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-07-11 12:57:19 -07:00
tc
thermal Thermal: Fix lockup of cpu_down() 2013-07-22 09:34:46 +08:00
tty parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
uio uio: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT 2013-07-03 16:07:26 -07:00
usb usb: phy: fix build breakage 2013-08-23 10:41:46 -07:00
uwb drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
vfio vfio-pci: Avoid deadlock on remove 2013-07-24 16:36:41 -06:00
vhost vhost: more fixes for 3.11 2013-07-23 14:38:20 -07:00
video fbdev fixes: 2013-08-09 11:52:34 -07:00
virt
virtio No real surprises. 2013-07-10 14:50:58 -07:00
vlynq
vme
w1 drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode 2013-07-03 16:08:06 -07:00
watchdog Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
xen Bug-fixes: 2013-08-21 16:38:33 -07:00
zorro zorro: switch to fixed_size_llseek() 2013-06-29 12:57:28 +04:00
Kconfig For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
Makefile For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00