On Thu, 2006-12-21 at 12:01 -0800, Linus Torvalds wrote: > What do you guys think? Does something like this work out for S/390 too? I > tried to make that "ptep_flush_dirty()" concept work for architectures > that hide the dirty bit somewhere else too, but.. For s390 there are two aspects to consider: 1) the pte values are 100% software controlled. They only change because a cpu stored a value to it or issued one of the specialized instructions (csp, ipte and idte). The ptep_flush_dirty would be a nop for s390. 2) ptep_exchange is a bit dangerous. For s390 we need a lock that protects the software controlled updates of the ptes. The reason is the ipte instruction. It is implemented by the machine microcode in a non-atomic way in regard to the memory. It reads the byte of the pte that contains the invalid bit, flushes the tlb entries for it and then writes back the byte with the invalid bit set. The microcode makes sure that this pte cannot be used for form a new tlb on any cpu while the ipte is in progress. That means a compare-and-swap semantics on ptes won't work together with the ipte optimization. As long as there is the pte lock that protects all software accesses to the pte we are fine. But if any code expects that ptep_exchange does something like an xchg things break. -- blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- Re: 2.6.19 file content corruption on ext3
- From: Linus Torvalds <[email protected]>
- Re: 2.6.19 file content corruption on ext3
- From: Peter Zijlstra <[email protected]>
- Re: 2.6.19 file content corruption on ext3
- From: Linus Torvalds <[email protected]>
- Re: 2.6.19 file content corruption on ext3
- From: Peter Zijlstra <[email protected]>
- Re: 2.6.19 file content corruption on ext3
- From: Arjan van de Ven <[email protected]>
- [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Hugh Dickins <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Martin Michlmayr <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Martin Michlmayr <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Martin Schwidefsky <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <[email protected]>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <[email protected]>
- Re: 2.6.19 file content corruption on ext3
- Prev by Date: Re: [patch 2.6.12-rc2] PNP: export pnp_bus_type
- Next by Date: Re: [PATCH -rt] update kmap_atomic on !HIGHMEM
- Previous by thread: Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- Next by thread: Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- Index(es):