Messages in this thread | | | Date | Fri, 16 Feb 2001 12:44:05 -0500 (EST) | From | Ben LaHaise <> | Subject | Re: x86 ptep_get_and_clear question |
| |
On Fri, 16 Feb 2001, Linus Torvalds wrote:
> How do you expect to ever see this in practice? Sounds basically > impossible to test for this hardware race. The obvious "try to dirty as > fast as possible on one CPU while doing an atomic get-and-clear on the > other" thing is not valid - it's in fact quite likely to get into > lock-step because of page table cache movement synchronization. And as > such it could hide any race.
That's not the behaviour I'm testing, but whether the CPU is doing
lock pte = *ptep if (present && writable) pte |= dirty *ptep = pte unlock
versus
lock pte = *ptep pte |= dirty *ptep = pte unlock
Which can be tested by means of getting the pte into the tlb then changing the pte without flushing and observing the results (page fault vs changed pte). I'm willing to bet that all cpus are doing the first version.
-ben
- 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/
| |