作者jeunder ()
看板LinuxDev
標題Re: [問題] Linux SMP 是否需要 cache coherency ꨠ…
時間Tue Feb 23 23:28:32 2010
看起來 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
很好奇, 業界的 embedded system 實作, 是不是很少有人在搞 Linux SMP ?
如果有, 是不是都滿足以上假設 ?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.32.230.36
※ 編輯: jeunder 來自: 114.32.230.36 (02/23 23:45)
1F:→ Spig:當然很少人在搞Embedded Linux SMP - 你有聽過幾顆 ARM/MIPS 02/23 23:55
2F:→ Spig:是二個以上的 core 而且還是 SMP? 02/23 23:56
3F:推 freesamael:主流的arm mpcore有提供cache coherency 03/02 09:31
4F:→ freesamael:而且如果scale不大的話,硬體cc就沒有效率的問題 03/02 09:33
5F:→ freesamael:kernel level做假設沒有cc等於在做distributed OS 03/02 09:34
6F:→ freesamael:複雜度太高,學術界做研究的很多,但是都做不長久 03/02 09:35
7F:→ freesamael:微軟的研究中心最近也在做一套叫barrelfish的,就是以 03/02 09:36
8F:→ freesamael:L4 microkernel為基礎做假設完全沒有shared memory的OS 03/02 09:37