From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Liam Girdwood <lrg@ti.com>, Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 1/2 v2] ASoC: soc-cache: block based rbtree compression
Date: Tue, 3 May 2011 12:46:18 +0100 [thread overview]
Message-ID: <20110503114618.GA2215@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110503112651.GH1762@opensource.wolfsonmicro.com>
On Tue, May 03, 2011 at 12:26:51PM +0100, Mark Brown wrote:
> On Tue, May 03, 2011 at 12:24:24PM +0100, Dimitris Papastamos wrote:
>
> > Yes, I will look into that. The block size will still need to be to set
> > to determine the maximum size of the variable length block. Otherwise
> > there is no way to determine if we need to allocate a new node for the
> > rbtree or not.
>
> I don't think that's required - if we just allocate blocks containing
> only contiguous registers we don't need to worry about it, the decision
> is just based on if there's an adjacent register we know about it.
So at init time, we populate the tree based on the defaults register
map. Each block contains only contiguous registers. If there exist
two nodes A and B, containing adjacent blocks meaning that the last
register in A's block is one before the first register in B's block, we can
eliminate one node and merge the two blocks into the other node.
We can do this yes. One possible problem is that if we start merging
blocks like that, in the long run we might end-up having one node with a
very large block. This will happen for example if we write to the
entire register map. In that case looking up a register will require
O(n) time in the worst case where n is the number of registers. If we
however have a constant limit k on the block size, we can cut this down to
O(klogn) in the worst case.
Of course we can also avoid merging blocks altogether, and just consider
blocks as full.
Thanks,
Dimitris
next prev parent reply other threads:[~2011-05-03 11:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 12:28 [PATCH 1/2 v2] ASoC: soc-cache: block based rbtree compression Dimitris Papastamos
2011-05-02 12:28 ` [PATCH 2/2 v2] ASoC: soc-cache: cache a pointer to the last accessed rbtree block Dimitris Papastamos
2011-05-02 14:29 ` [PATCH 1/2 v2] ASoC: soc-cache: block based rbtree compression Takashi Iwai
2011-05-02 14:40 ` Dimitris Papastamos
2011-05-02 14:46 ` Takashi Iwai
2011-05-02 14:51 ` Dimitris Papastamos
2011-05-02 14:42 ` Dimitris Papastamos
2011-05-02 14:47 ` Takashi Iwai
2011-05-02 14:58 ` Dimitris Papastamos
2011-05-03 9:43 ` Mark Brown
2011-05-03 10:38 ` Takashi Iwai
2011-05-03 10:47 ` Mark Brown
2011-05-03 10:50 ` Takashi Iwai
2011-05-03 11:02 ` Mark Brown
2011-05-03 12:25 ` Takashi Iwai
2011-05-03 13:02 ` Mark Brown
2011-05-03 13:18 ` Takashi Iwai
2011-05-03 13:24 ` Mark Brown
2011-05-03 13:32 ` Takashi Iwai
2011-05-03 13:51 ` Mark Brown
2011-05-03 14:07 ` Takashi Iwai
2011-05-03 14:27 ` Mark Brown
2011-05-03 15:22 ` Takashi Iwai
2011-05-03 15:24 ` Mark Brown
2011-05-03 15:30 ` Takashi Iwai
2011-05-03 15:40 ` Mark Brown
2011-05-03 15:47 ` Takashi Iwai
2011-05-03 15:48 ` Mark Brown
2011-05-03 15:54 ` Takashi Iwai
2011-05-03 15:55 ` Mark Brown
2011-05-03 16:06 ` Takashi Iwai
2011-05-03 11:21 ` Mark Brown
2011-05-03 11:24 ` Dimitris Papastamos
2011-05-03 11:26 ` Mark Brown
2011-05-03 11:46 ` Dimitris Papastamos [this message]
2011-05-03 13:44 ` 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=20110503114618.GA2215@opensource.wolfsonmicro.com \
--to=dp@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=lrg@ti.com \
--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.