]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: rearrange fields in vm_area_struct to be more cache-friendly
authorSuren Baghdasaryan <surenb@google.com>
Wed, 23 Nov 2022 00:32:47 +0000 (00:32 +0000)
committerSuren Baghdasaryan <surenb@google.com>
Wed, 23 Nov 2022 02:09:44 +0000 (02:09 +0000)
Move frequently accessed fields into the first cache line.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
include/linux/mm_types.h

index eba3987b22d8ad8166c45105f9ac5961a80d14ab..eb8452bdebb85ec392f8b257d9fbbabbd420c4d9 100644 (file)
@@ -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;