看板 LinuxDev 關於我們 聯絡資訊
※ 引述《jeunder ()》之銘言: : : → richliu:那只是你沒有碰到 non-coherence platfrom 02/22 20:07 : : → richliu:如果是 SMP 又是 non hw-coherence platform, 那很麻煩 02/22 20:08 : Linux source code 裡不知道有沒有 SMP + non hw-coherence 的例子可參考 ? : 目前正在弄一顆 MIPS SoC, : 有三個 processor (CPU 複製貼上三份), : 經由單一 bus 共享 memory, : processor 之間沒有 hw cache coherence protocol, : 而且為了 performance 考量, 使用 write-back cache, 想到就頭大. : 看了一下 linux mips architecture 的 source code, : 發現應該幾乎不可能做到 SMP (在我的 hw 條件下), : 或者需要改非常大, 難度頗高. : 我懷疑在這樣的條件下, 根本沒有人做到 Linux SMP. : 不知道有沒有人有相關經驗或資訊可供參考 ? LL/SC 是 mips 中,實做RMW(read-modify-write) sequece 最底層(也是唯一的)基礎建設 節錄自 MIPS32 ARCHITECTURE Spec ----------------- Store Conditional Word: Atomic RMW is provided only for synchronizable memory locations. A synchronizable memory location is one that is associated with the state and logic necessary to implement the LL/SC semantics. Whether a memory location is synchronizable depends on the processor and system confgurations, and on the memory access type used for the location: Uniprocessor atomicity: ... MP atomicity: To provide atomic RMW among multiple processors, all accesses to the location must be made with a memory access type of cached coherent. I/O System: ... ---------------- 即使只有特定的一小塊 coherent memory (ex: shared cache),也會需要大改特改 完全沒有的話... 光靠軟體應該是沒辦法的 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.60.246