contributed by < guojiun
>
為何 Linux 採用 macro 來實作 linked list?一般的 function call 有何成本?
依據 function-call overhead… real? or not?
實驗結果:
使用 gnuplot 製圖,視覺化展現
Linux 應用 linked list 在哪些場合?舉三個案例並附上對應程式碼,需要解說,以及揣摩對應的考量
GNU extension 的 typeof 有何作用?在程式碼中扮演什麼角色?
解釋以下巨集的原理
除了你熟悉的 add 和 delete 操作,list.h 還定義一系列操作,為什麼呢?這些有什麼益處?
摘要 Linux kernel design patterns - part 2
All of the other macros use the "prefetch" function to suggest that the CPU starts fetching the ->next pointer at the start of each iteration so that it will already be available in cache when the next iteration starts (though the "safe" macros actually fetch it rather than prefetch it).
安全性
list_for_each_safe 和 list_for_each 的差異在哪?“safe” 在執行時期的影響為何?
While this will normally improve performance, there are cases when it will slow things down.
(prefetch 不一定對提昇效能有所幫助)When the walk of the list will almost always abort very early - usually only considering the first item - the prefetch will often be wasted effort. In these cases (currently all in the networking code) the __list_for_each() macro is available.
(在只考慮 list 中第一個 item 的使用情境下,prefetch 就可能適得其反了)In these cases (currently all in the networking code) the __list_for_each() macro is available.
LIST_POISONING 這樣的設計有何意義?
for_each 風格的開發方式對程式開發者的影響為何?
思考 for_each macro 對於靜態分析的幫助
程式註解裡頭大量存在 @ 符號,這有何意義?你能否應用在後續的程式開發呢?
tests/ 目錄底下的 unit test 的作用為何?就軟體工程來說的精神為何?
tests/ 目錄的 unit test 可如何持續精進和改善呢?