From: Liam Girdwood <lrg@ti.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"patches@opensource.wolfsonmicro.com"
<patches@opensource.wolfsonmicro.com>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 1/2 v3] ASoC: soc-cache: Block based rbtree compression
Date: Fri, 20 May 2011 09:45:02 +0100 [thread overview]
Message-ID: <4DD62A0E.1010905@ti.com> (raw)
In-Reply-To: <1305809130-18410-1-git-send-email-dp@opensource.wolfsonmicro.com>
On 19/05/11 13:45, Dimitris Papastamos wrote:
> This patch prepares the ground for the actual rbtree optimization patch
> which will save a pointer to the last accessed rbnode that was used
> in either the read() or write() functions.
>
> Each rbnode manages a variable length block of registers. There can be no
> two nodes with overlapping blocks. Each block has a base register and a
> currently top register, all the other registers, if any, lie in between these
> two and in ascending order.
>
> The reasoning behind the construction of this rbtree is simple. In the
> snd_soc_rbtree_cache_init() function, we iterate over the register defaults
> provided by the driver. For each register value that is non-zero we
> insert it in the rbtree. In order to determine in which rbnode we need
> to add the register, we first look if there is another register already
> added that is adjacent to the one we are about to add. If that is the case
> we append it in that rbnode block, otherwise we create a new rbnode
> with a single register in its block and add it to the tree.
>
> In the next patch, where a cached rbnode is used by both the write() and the
> read() functions, we also check if the register we are about to add is in the
> cached rbnode (the least recently accessed one) and if so we append it in that
> rbnode block.
>
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
> ---
>
Both
Acked-by: Liam Girdwood <lrg@ti.com>
next prev parent reply other threads:[~2011-05-20 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 12:45 [PATCH 1/2 v3] ASoC: soc-cache: Block based rbtree compression Dimitris Papastamos
2011-05-19 12:45 ` [PATCH 2/2 v3] ASoC: soc-cache: Cache a pointer to the last accessed rbnode Dimitris Papastamos
2011-05-20 8:45 ` Liam Girdwood [this message]
2011-05-20 10:22 ` [PATCH 1/2 v3] ASoC: soc-cache: Block based rbtree compression Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DD62A0E.1010905@ti.com \
--to=lrg@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.