Re: [PATCH v2 2/3] mm/hmm: fix ZONE_DEVICE anon page mapping reuse

2019-07-22 Thread Christoph Hellwig
> + /* > + * When a device_private page is freed, the page->mapping field > + * may still contain a (stale) mapping value. For example, the > + * lower bits of page->mapping may still identify the page as > + * an anonymous page. Ultim

Re: [PATCH v2 2/3] mm/hmm: fix ZONE_DEVICE anon page mapping reuse

2019-07-19 Thread John Hubbard
On 7/19/19 12:29 PM, Ralph Campbell wrote: > When a ZONE_DEVICE private page is freed, the page->mapping field can be > set. If this page is reused as an anonymous page, the previous value can > prevent the page from being inserted into the CPU's anon rmap table. > For example, when migrating a pte

[PATCH v2 2/3] mm/hmm: fix ZONE_DEVICE anon page mapping reuse

2019-07-19 Thread Ralph Campbell
When a ZONE_DEVICE private page is freed, the page->mapping field can be set. If this page is reused as an anonymous page, the previous value can prevent the page from being inserted into the CPU's anon rmap table. For example, when migrating a pte_none() page to device memory: migrate_vma(ops, v