On 30. 07. 24 16:44, Mark Brown wrote:
On Tue, Jul 30, 2024 at 04:13:33PM +0200, Jaroslav Kysela wrote:On 30. 07. 24 14:33, Takashi Iwai wrote:OK, now it's clearer. I think we can change snd_ctl_find_*() rather to take rwlock instead of rwsem. It's only a quick look-up, hence rwlock can work well.Totally untested patch set is below.But why the interrupt routine does not use the cached kcontrol pointer? It looks like a bad driver design when you need to do such name (string based) lookups from the interrupt routine.With some of these slower buses it's not immediately obvious that it's worth the bother of caching - the overhead of doing the lookup is negligable in the overall context of handling the interrupt.
I don't buy that argument. We should always try to write an optimal code. Every CPU tick counts.
Jaroslav -- Jaroslav Kysela <perex@xxxxxxxx> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
- Follow-Ups:
- References:
- [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Charles Keepax
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Takashi Iwai
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Charles Keepax
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Takashi Iwai
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Charles Keepax
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Takashi Iwai
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Jaroslav Kysela
- Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- From: Mark Brown
- [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- Prev by Date: [PATCH v4 2/2] Revert "ALSA: firewire-lib: operate for period elapse event in process context"
- Next by Date: Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- Previous by thread: Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- Next by thread: Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread
- Index(es):