Re: Flush_cache_page inteface (was: Re: [PATCH] Cache alias issues for swapped page)

From: David S. Miller (davem@redhat.com)
Date: Sun Sep 10 2000 - 21:02:23 EST


   From: NIIBE Yutaka <gniibe@chroot.org>
   Date: Mon, 11 Sep 2000 11:10:13 +0900

   Then, there is another issue for physically tagged cache system in the
   function memory.c:break_cow. It calles flush_cache_page(vma,
   address). For physically tagged cache system, we need __physical
   address__ here. Currently, the implementation of SH-4 version of
   flush_cache_page(vma, address) takes the physicall address from PTE.
   However, at this point, PTE is not set for new_page, so, it doesn't
   flush the cache for new_page, but the one for old_page.

PTE is not set for new_page at this point, the sequence is:

        flush_page_to_ram(new_page);
        flush_cache_page(vma, address);
        establish_pte(vma, address, page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));

establish_pte happens after flush_cache_page, establish_pte
is what change the PTE over to new_page.

Maybe you are looking at some very old 2.3.x kernel version
which had the order changed?

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:14 EST