[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151214175756.GW5727@sirena.org.uk>
Date: Mon, 14 Dec 2015 17:57:56 +0000
From: Mark Brown <broonie@...nel.org>
To: Xiubo Li <lixiubo@...s.chinamobile.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap: flat: introduce register striding to save some
memories
On Mon, Dec 14, 2015 at 03:14:34PM +0800, Xiubo Li wrote:
> static int regcache_flat_write(struct regmap *map, unsigned int reg,
> unsigned int value)
> {
> + unsigned int index = reg / map->reg_stride;
So, this does save some memory. On the other hand one of the big goals
for the flat cache is to be as fast as possible to match the performance
of MMIO and divisions aren't the cheapest operations. If this was the
rbtree cache then it'd not be an issue but in the flat cache speed is
definitely the top priority, at least by default.
I'm guessing for your particular register maps the performance isn't too
big an issue... do you have any numbers for how much space you're
saving overall? Is it worth finding a way to make this possible to
enable on maps that benefit?
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists