Kernel: fast path 和 slow path straight-line code path

参考

https://kernelnewbies.org/FAQ/FastpathAndSlowpath
https://www.eecis.udel.edu/~cavazos/nips-sl2-final.pdf
/Documentation/static-keys.txt

快慢路径解释

快与慢的区别主要就是体现在代码量上,如果没有竞争存在,直接占有,非常快,如果资源被占用,就需要一些列的强制、等待操作,就非常慢。
In general, “fast path” is the commonly run code that should finish very quickly. For example, when it comes to spinlocks the fast path is that nobody is holding the spinlock and the CPU that wants it can just take it.

Conversely, the slow path for spinlocks is that the lock is already taken by somebody else and the C

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/125956096