diff mbox series

[RFC,v1,2/4] mm: also set VMA in khugepaged range invalidation

Message ID DB7PR02MB3979E79A7ADF7E7B2F397418BB5A0@DB7PR02MB3979.eurprd02.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series [RFC,v1,1/4] mm/remote_mapping: mirror a process address space | expand

Commit Message

Mircea CIRJALIU - MELIU Dec. 11, 2019, 9:29 a.m. UTC
MMU notifier client may need the VMA for extra info.
This change is needed by the remote mapping feature that inspects anon VMAs
with huge mappings. 

Signed-off-by: Mircea Cirjaliu <mcirjaliu@bitdefender.com>
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kirill A . Shutemov Dec. 11, 2019, 3:44 p.m. UTC | #1
On Wed, Dec 11, 2019 at 09:29:21AM +0000, Mircea CIRJALIU - MELIU wrote:
> MMU notifier client may need the VMA for extra info.
> This change is needed by the remote mapping feature that inspects anon VMAs
> with huge mappings. 

The change itself is okay, but commit message should be better.

Do we have any user of mmu notifiers in current kernel that affected by
the missing vma here?

And subject starting with 'also' looks wrong to me.
Mircea CIRJALIU - MELIU Dec. 11, 2019, 4:16 p.m. UTC | #2
> On Wed, Dec 11, 2019 at 09:29:21AM +0000, Mircea CIRJALIU - MELIU wrote:
> > MMU notifier client may need the VMA for extra info.
> > This change is needed by the remote mapping feature that inspects anon
> > VMAs with huge mappings.
> 
> The change itself is okay, but commit message should be better.
> 
> Do we have any user of mmu notifiers in current kernel that affected by the
> missing vma here?

No. This patch is a small part of a series of commits for the remote mapping feature.
The kernel can do well without it.

> 
> And subject starting with 'also' looks wrong to me.
> 
> --
>  Kirill A. Shutemov

Mircea
diff mbox series

Patch

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index b679908..11c65f3 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1028,7 +1028,7 @@  static void collapse_huge_page(struct mm_struct *mm,
 
 	anon_vma_lock_write(vma->anon_vma);
 
-	mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm,
+	mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm,
 				address, address + HPAGE_PMD_SIZE);
 	mmu_notifier_invalidate_range_start(&range);