Re: [PATCH] flush_cache_page while pte valid

Manfred Spraul (manfred@colorfullife.com)
Mon, 11 Nov 2002 22:20:30 +0100


> /* 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.

Documentation:
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.

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/