Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348722 > unrolled thread
| Started by | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> |
|---|---|
| First post | 2016-03-03 04:10 +0100 |
| Last post | 2016-03-03 04:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [4/4] MIPS: Sync icache & dcache in set_pte_at Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2016-03-03 04:10 +0100
| From | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> |
|---|---|
| Date | 2016-03-03 04:10 +0100 |
| Subject | Re: [4/4] MIPS: Sync icache & dcache in set_pte_at |
| Message-ID | <r8rOi-I0-9@gated-at.bofh.it> |
Paul Burton wrote:
> It is, however, used in such a way by others & seems to me like the only
> correct way to implement the lazy cache flushing. The alternative would
> be to adjust all generic code to ensure flush_icache_page gets called
> before set_pte_at
... which is an exact case right now. Both calls of flush_icache_page() are:
1) do_swap_page()
flush_icache_page(vma, page);
if (pte_swp_soft_dirty(orig_pte))
pte = pte_mksoft_dirty(pte);
set_pte_at(mm, address, page_table, pte);
...
2) do_set_pte()
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (write)
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
if (anon) {
inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
page_add_new_anon_rmap(page, vma, address);
} else {
inc_mm_counter_fast(vma->vm_mm, MM_FILEPAGES);
page_add_file_rmap(page);
}
set_pte_at(vma->vm_mm, address, pte, entry);
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, pte);
....
You should only be sure that flush_icache_page() completes a lazy
D-cache flush.
- Leonid.
Back to top | Article view | linux.kernel
csiph-web