Thread (16 messages) flat view 16 messages, 3 authors, 2021-08-16

Re: [PATCH net-next 4/6] net: ipa: ensure hardware has power in ipa_start_xmit()

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-08-16 14:15:52
Also in: lkml

On Fri, 13 Aug 2021 21:25:23 -0500 Alex Elder wrote:
quoted
This is racy, what if the pm work gets scheduled on another CPU and
calls wake right here (i.e. before you call netif_stop_queue())?
The queue may never get woken up?  
I haven't been seeing this happen but I think you may be right.

I did think about this race, but I think I was relying on the
PM work queue to somehow avoid the problem.  I need to think
about this again after a good night's sleep.  I might need
to add an atomic flag or something.
Maybe add a spin lock?  Seems like the whole wake up path will be
expensive enough for a spin lock to be in the noise. You can always 
add complexity later.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help