You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "mu578 (via GitHub)" <gi...@apache.org> on 2023/09/16 02:08:24 UTC
[GitHub] [nuttx] mu578 commented on issue #9531: Thread holding spinlock can be blocked.
mu578 commented on issue #9531:
URL: https://github.com/apache/nuttx/issues/9531#issuecomment-1722105737
> Suspending the holder of a spinlock can cause a myriad of failures. Suspending the holder does not free the spinlock; the spinlock remains locked while the holder is blocked. In the worst case, this can cause deadlocks since the holder of the spinlock is blocked and may not have the priority to run again to release it.
>
> Another spinlock performance issue: #1488
>
> The point of this issue, @mu578 your comments, and #1488 is that better management of spinlocks is needed for them to really work as needed in SMP. And, as @xiaoxiang781216 has pointed out, there are some tricky design issues that would have to be addressed to accomplish that.
>
> Perhaps we could do something as simple as adding a in-a-spinlock flag in the TCB which would very temporarily lock the scheduler just like lockcount > 0? Very simple but also kind of kludgey.
that was my point, indeed starting with a narrowed environment, then experiencing different isolated strategies, I don't think one can solve this kind of model by just a theoretical approach, it is too practical driven, maybe two different types of scheduling for high and low priority groups would be a solution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org