From: Suren Baghdasaryan Date: Wed, 23 Nov 2022 00:32:47 +0000 (+0000) Subject: mm: rearrange fields in vm_area_struct to be more cache-friendly X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c5f2f83a20231aba101889a7d5a4ea555f718f8b;p=users%2Fjedix%2Flinux-maple.git mm: rearrange fields in vm_area_struct to be more cache-friendly Move frequently accessed fields into the first cache line. Signed-off-by: Suren Baghdasaryan --- diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index a05627f704ff4..2b618d73ee262 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -455,6 +455,10 @@ struct vm_area_struct { #endif }; + unsigned long vm_flags; /* Flags, see mm.h. */ + + struct anon_vma *anon_vma; /* Serialized by page_table_lock */ + struct mm_struct *vm_mm; /* The address space we belong to. */ /* @@ -462,7 +466,6 @@ struct vm_area_struct { * See vmf_insert_mixed_prot() for discussion. */ pgprot_t vm_page_prot; - unsigned long vm_flags; /* Flags, see mm.h. */ /* * For areas with an address space and backing store, @@ -492,7 +495,6 @@ struct vm_area_struct { */ struct list_head anon_vma_chain; /* Serialized by mmap_lock & * page_table_lock */ - struct anon_vma *anon_vma; /* Serialized by page_table_lock */ /* Function pointers to deal with this struct. */ const struct vm_operations_struct *vm_ops;