Re: [PATCH v6 2/2] hugetlb: take PMD sharing into account when flushing tlb/caches

2018-08-23 Thread Naoya Horiguchi
On Thu, Aug 23, 2018 at 01:59:17PM -0700, Mike Kravetz wrote: > When fixing an issue with PMD sharing and migration, it was discovered > via code inspection that other callers of huge_pmd_unshare potentially > have an issue with cache and tlb flushing. > > Use the routine adjust_range_if_pmd_shari

[PATCH v6 2/2] hugetlb: take PMD sharing into account when flushing tlb/caches

2018-08-23 Thread Mike Kravetz
When fixing an issue with PMD sharing and migration, it was discovered via code inspection that other callers of huge_pmd_unshare potentially have an issue with cache and tlb flushing. Use the routine adjust_range_if_pmd_sharing_possible() to calculate worst case ranges for mmu notifiers. Ensure