- 论坛徽章:
- 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.
看这个函数的实现,感觉它只是把page->virtual的 page cache flush。
我怎么也想不明白,假设一个vma映射到某个page。现在kernel 写了一些内容到page上,然后执行flush_dcache_page。
为了也就是下次访问vma时能够得到fresh value。
但flush_dcache_page冲刷的是kseg0区域的 vaddr, 而vma 处于kuseg,而且由于cache alias的存在,vma和kseg0 vaddr是不在一个cache set中的,
所以冲刷也只是冲刷的 kseg0 vaddr cache entry,并没有对vma cache entry有影响。
如果vma cache entry没有 invalid,那它如何取得fresh value呢?
谢谢 |
|