Re: [PATCH] flush_cache_page while pte valid

From: Manfred Spraul (
Date: Mon Nov 11 2002 - 16:20:30 EST

> /* Nuke the page table entry. */
>+ flush_cache_page(vma, address);
> pte = ptep_get_and_clear(ptep);
> flush_tlb_page(vma, address);
>- flush_cache_page(vma, address);

Is it correct that this are 3 arch hooks that must appear back to back?
What about one hook with all parameters?

        pte = ptep_get_and_clear_and_flush(ptep, vma, address);

The current implementation just asks for such errors.

ptep_get_and_clear_and_flush() removes the page table entry *ptep from the page tables and clears all caches (tlb, cpu cache if virtually tagged).
The return value contains the final value of the pte. The critical information is the dirty bit in the pte - on SMP one cpu can call ptep_get_and_clear_and_flush() while another cpu accesses the mmap'ing from user space.


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:23 EST