public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	lgirdwood@gmail.com
Subject: Re: [PATCH 2/2] ASoC: dapm: Add cache to speed up adding of routes
Date: Thu, 07 May 2015 16:53:34 +0200	[thread overview]
Message-ID: <554B7C6E.2030701@metafoo.de> (raw)
In-Reply-To: <20150507124811.GV15510@sirena.org.uk>

On 05/07/2015 02:48 PM, Mark Brown wrote:
[...]
>> +skip_search:
>> +	if (cache) {
>> +		cache->sink = wsink;
>> +		cache->source = wsource;
>> +	}
>> +
>
> Putting this into a store hit function would be good.
>
>>   	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
>>   	for (i = 0; i < num; i++) {
>> -		r = snd_soc_dapm_add_route(dapm, route);
>> +		r = snd_soc_dapm_add_route(dapm, route, &cache);
>
> Should we just have the cache in the dapm context or the card instead of
> locally?  It's only two pointers at the minute so there doesn't seem to
> be much cost from keeping it around and it might generate somme more
> hits for some use cases.  Or to put it another way why is the cache
> optional and created and re-created here like this?

I don't think the cache will produce hits anywhere else other then adding 
routes from the same route table. That's the only place were the same widget 
or widgets close to each other are accessed sequentially. I'd prefer to keep 
it locally.

  parent reply	other threads:[~2015-05-07 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 10:33 [PATCH 1/2] ASoC: dapm: Break out of widget search when source and sink are located Charles Keepax
2015-05-07 10:33 ` [PATCH 2/2] ASoC: dapm: Add cache to speed up adding of routes Charles Keepax
2015-05-07 11:22   ` Lars-Peter Clausen
2015-05-07 12:35     ` Charles Keepax
2015-05-07 12:39     ` Mike Looijmans
2015-05-07 13:16     ` Mark Brown
2015-05-07 12:48   ` Mark Brown
2015-05-07 13:52     ` Charles Keepax
2015-05-07 14:09       ` Mark Brown
2015-05-07 14:53     ` Lars-Peter Clausen [this message]
2015-05-07 16:33       ` Mark Brown
2015-05-07 11:24 ` [PATCH 1/2] ASoC: dapm: Break out of widget search when source and sink are located Lars-Peter Clausen
2015-05-07 11:25 ` 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=554B7C6E.2030701@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox