- 論壇徽章:
- 0
|
cachetlb.txt中描述
void flush_dcache_page(struct page *page)
Any time the kernel writes to a page cache page, _OR_
the kernel is about to read from a page cache page and
user space shared/writable mappings of this page potentially
exist, this routine is called.
看這個函數(shù)的實現(xiàn),感覺它只是把page->virtual的 page cache flush。
我怎么也想不明白,假設一個vma映射到某個page,F(xiàn)在kernel 寫了一些內(nèi)容到page上,然后執(zhí)行flush_dcache_page。
為了也就是下次訪問vma時能夠得到fresh value。
但flush_dcache_page沖刷的是kseg0區(qū)域的 vaddr, 而vma 處于kuseg,而且由于cache alias的存在,vma和kseg0 vaddr是不在一個cache set中的,
所以沖刷也只是沖刷的 kseg0 vaddr cache entry,并沒有對vma cache entry有影響。
如果vma cache entry沒有 invalid,那它如何取得fresh value呢?
謝謝 |
|