Re: [PATCH 4/6] regmap: Add the LZO cache support

Lars-Peter Clausen
2011-09-05T16:18:41Z

On 09/05/2011 03:51 PM, Dimitris Papastamos wrote:
> This patch adds support for LZO compression when storing the register
> cache.
>
> For a typical device whose register map would normally occupy 25kB or 50kB
> by using the LZO compression technique, one can get down to ~5-7kB. There
> might be a performance penalty associated with each individual read/write
> due to decompressing/compressing the underlying cache, however that should not
> be noticeable. These memory benefits depend on whether the target architecture
> can get rid of the memory occupied by the original register defaults cache
> which is marked as __devinitconst. Nevertheless there will be some memory
> gain even if the target architecture can't get rid of the original register
> map, this should be around ~30-32kB instead of 50kB.
>
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
> ---
> drivers/base/regmap/Makefile | 2 +-
> drivers/base/regmap/internal.h | 2 +
> drivers/base/regmap/regcache-lzo.c | 361 ++++++++++++++++++++++++++++++++++++
> drivers/base/regmap/regcache.c | 1 +
> include/linux/regmap.h | 1 +
> 5 files changed, 366 insertions(+), 1 deletions(-)
> create mode 100644 drivers/base/regmap/regcache-lzo.c
>

Fails to compile due to CONFIG_LZO_{COMPRESS,DECOMPRESS} not being selected.
Also it will have issues, with caches where we don't use raw cache defaults.