2.4.10pre13aa1
Quoted 5 lines
Quoted 5 lines
with only the dirty bit set? Does somebody know for sure? I can imagine the cpu finding the tlb state writeable, and issuing just a locked bit test and set in the pte without caring to check if the pte is zero or not.
Quoted 9 lines
Quoted 3 lines
If the cpu just set the bit this patch will avoid to lose a shared mapping update. Otherwise it's a safe noop so I keep it applied until this issue is sorted out
I've tested this on all the machines I could get my hands on, and every single CPU will take a page fault if the pte is not present on dirtying the page. If people are truely paranoid, then make it a boot time assertion.
I don't think that this is a valid argument:
you are testing on i386 and make design decisions for the architecture independant part.
I'd prefer ptep_get_and_clear_and_flush(), then the arch part can do what's needed to get the final pte value. (if a single page is modified, otherwise the arch can define a suitable mmu_gather)
--
Manfred
Quoted 1 line · Manfred Spraul
I'd prefer
ptep_get_and_clear_and_flush(), then the arch part can do
agreed. In the meantime I'll just keep the assert.
Andrea
Quoted 3 lines · Manfred Spraul
I don't think that this is a valid argument:
you are testing on i386 and make design decisions for the architecture independant part.
The hook is only needed for x86-like architectures, as all of the risc like cpus perform the dirty state modification in the page fault handler while holding the page_table_lock.
Quoted 3 lines
I'd prefer
ptep_get_and_clear_and_flush(), then the arch part can do what's needed to get the final pte value. (if a single page is modified, otherwise the arch can define a suitablemmu_gather)
mmu_gather is the hook. ia64 for instance can create a gather that uses the hardware tlb flush instruction to shootdown the entry across all cpus and eliminates the race.
-ben