Re: [問題] Linux SMP 是否需要 cache coherency ꨠ…
※ 引述《jeunder ()》之銘言:
: 看起來 kernel 裡面有太多 code 都是假設有 multi-processor cache coherence.
: spin lock 也只能用來確保 atomic,
: 然而有太多地方都直接 read/write memory 給 MP 之間取用,
: 完全沒有對 cache coherence 做特別處理.
: 我懷疑 Linux SMP 機制, 有不成文的假設,
: 就是假設 MP 之間一定有 cache coherence 機制,
: 因此不用擔心隨便 write 某個共用 memory 就得用 ipi 通知所有 processor
: 做 cache flush/invalidate.
: 看看神寫的 mail 內容, 似乎也是這個意思 ?
: http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/1220.html
: 然後參考這個網頁, 則是做到了我想做的事, kernel 應該改不少, 而且也有不少限制.
: 所以不敢自稱 SMP, 只稱 SMP-like.
: http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like
網頁中的例子,spin_lock 是建立在 core_lock 上
而 core_lock 又建立在
"Shared on-chip L2 SRAM - Cannot be cacheable"
所以,到底還是需要 non-cacheable / coherent memory
: 很好奇, 業界的 embedded system 實作, 是不是很少有人在搞 Linux SMP ?
: 如果有, 是不是都滿足以上假設 ?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.60.246
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 6 之 6 篇):