作者callisto2 (tte)
看板LinuxDev
标题Re: [问题] Linux SMP 是否需要 cache coherency ꨠ…
时间Tue Feb 23 03:12:29 2010
※ 引述《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)