Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 25 Jul 2018 10:33:41 -0700 | Subject | Re: [PATCHv3 1/3] mm: Introduce vma_init() |
| |
On Wed, Jul 25, 2018 at 5:39 AM Kirill A. Shutemov <kirill@shutemov.name> wrote: > > There are few more: > > arch/arm64/include/asm/tlb.h: struct vm_area_struct vma = { .vm_mm = tlb->mm, }; > arch/arm64/mm/hugetlbpage.c: struct vm_area_struct vma = { .vm_mm = mm }; > arch/arm64/mm/hugetlbpage.c: struct vm_area_struct vma = { .vm_mm = mm };
We probably do not care. These are not "real" vma's and are never used as such. They are literally just fake vmas for the "flush_tlb()" machinery, which won't ever really cause any VM activity and will just call back to the architecture TLB flushing routines.
They initialize vm_mm exactly because that's how the mm is passed down to the tlb flushing (we pass the whole vma because some architectures than have special flags in vm_flags too that can affect how the TLB gets flushed - ie "only flush ITLB if it's an execute-only vma" etc).
Using "vma_init()" on them is only confusing, I think.
Linus
| |