Thread (54 messages) 54 messages, 5 authors, 2021-09-08

Re: [PATCH v5 15/21] ASoC: qdsp6: audioreach: add q6apm support

flat view

From: Srinivas Kandagatla <hidden>
Date: 2021-09-08 13:29:58
Also in: alsa-devel


On 08/09/2021 13:26, Mark Brown wrote:
On Wed, Sep 08, 2021 at 12:28:05PM +0100, Srinivas Kandagatla wrote:
quoted
On 07/09/2021 16:04, Pierre-Louis Bossart wrote:
quoted
quoted
quoted
quoted
quoted
+    spin_lock(&apm->lock);
+    idr_alloc(&apm->graph_idr, graph, graph_id,
+          graph_id + 1, GFP_ATOMIC);
does this need to be ATOMIC?
We are inside spinlock.
but this is not used in an interrupt handler or anything that isn't in a
process context, is it?
No, it is in process context only.
So why is it a spinlock then?
Only reason I ended-up with spin locks is because am guessing that busy loops in this case are not going to be for very long as its mostly dealing with idr resource.

On the other hand, I don't have any issues in moving this to mutex.

--srini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help