Re: [RFC PATCH 2/3] hugetlbfs: introduce hinode_rwsem for pmd sharing synchronization

2020-10-15 Thread Mike Kravetz
On 10/15/20 4:05 PM, HORIGUCHI NAOYA(堀口 直也) wrote: > On Tue, Oct 13, 2020 at 04:10:59PM -0700, Mike Kravetz wrote: >> Due to pmd sharing, the huge PTE pointer returned by huge_pte_alloc >> may not be valid. This can happen if a call to huge_pmd_unshare for >> the same pmd is made in another thread

Re: [RFC PATCH 2/3] hugetlbfs: introduce hinode_rwsem for pmd sharing synchronization

2020-10-15 Thread 堀口 直也
On Tue, Oct 13, 2020 at 04:10:59PM -0700, Mike Kravetz wrote: > Due to pmd sharing, the huge PTE pointer returned by huge_pte_alloc > may not be valid. This can happen if a call to huge_pmd_unshare for > the same pmd is made in another thread. > > To address this issue, add a rw_semaphore (hinode

[RFC PATCH 2/3] hugetlbfs: introduce hinode_rwsem for pmd sharing synchronization

2020-10-13 Thread Mike Kravetz
Due to pmd sharing, the huge PTE pointer returned by huge_pte_alloc may not be valid. This can happen if a call to huge_pmd_unshare for the same pmd is made in another thread. To address this issue, add a rw_semaphore (hinode_rwsem) to the hugetlbfs inode. - hinode_rwsem is taken in read mode bef