open-power / skiboot

OPAL boot and runtime firmware for POWER
Apache License 2.0
100 stars 134 forks source link

lock may consume too much time #286

Open MoonStar2n opened 8 months ago

MoonStar2n commented 8 months ago

lock is used very frequently in OPAL, and code should not block in OPAL.

lock

However, in the lock_caller function, if cpu not get lock, it will execute the following try to lock code which is in for loop until it get the lock. I think this design may consume too much time in some scenario, OPAL should return immediately whether or not the lock is acquired. Looking forward for your answer, thanks.