Re: [問題] Linux SMP 是否需要 cache coherency ꨠ…
※ 引述《jeunder ()》之銘言:
: 有三個 processor (CPU 複製貼上三份),
: 經由單一 bus 共享 memory,
: processor 之間沒有 hw cache coherence protocol,
: 而且為了 performance 考量, 使用 write-back cache, 想到就頭大.
: 看了一下 linux mips architecture 的 source code,
: 發現應該幾乎不可能做到 SMP (在我的 hw 條件下),
: 或者需要改非常大, 難度頗高.
: 我懷疑在這樣的條件下, 根本沒有人做到 Linux SMP.
: 不知道有沒有人有相關經驗或資訊可供參考 ?
我對 MPIS 不熟, 不過有個基本作法是:
1. 把 shared data structure 的 pages 設成 non-cacheable
或 2. 對 shared data structure 有寫入動作時, flush 寫入的 cache line
但是這些運作都不是 atomic operation, 對 critical section 要有 mutex 保護,
google ccNUMA machines 或許對你會有些幫助.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 129.2.94.48
※ 編輯: callisto2 來自: 129.2.94.48 (02/23 03:21)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 6 篇):