Messages in this thread | | | Date | Thu, 05 Dec 2013 15:05:19 -0500 | From | Rik van Riel <> | Subject | Re: [PATCH 14/15] mm: numa: Flush TLB if NUMA hinting faults race with PTE scan update |
| |
On 12/05/2013 02:54 PM, Mel Gorman wrote:
> I think that's a better fit and a neater fix. Thanks! I think it barriers > more than it needs to (definite cost vs maybe cost), the flush can be > deferred until we are definitely trying to migrate and the pte case is > not guaranteed to be flushed before migration due to pte_mknonnuma causing > a flush in ptep_clear_flush to be avoided later. Mashing the two patches > together yields this.
I think this would fix the numa migrate case.
However, I believe the same issue is also present in mprotect(..., PROT_NONE) vs. compaction, for programs that trap SIGSEGV for garbage collection purposes.
They could lose modifications done in-between when the pte was set to PROT_NONE, and the actual TLB flush, if compaction moves the page around in-between those two events.
I don't know if this is a case we need to worry about at all, but I think the same fix would apply to that code path, so I guess we might as well make it...
| |