From: Liam R. Howlett Date: Fri, 3 Sep 2021 15:15:33 +0000 (-0400) Subject: mm_types: Optimize mm_struct alignments X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=54ea2f28c842eaabec52b96083a98f2151d665ce;p=users%2Fjedix%2Flinux-maple.git mm_types: Optimize mm_struct alignments There are three atomic_t which are of size 4. This leaves a hole of 4 bytes on x86_64 according to pahole. Move map_count to the first cacheline to fill this hole. Signed-off-by: Liam R. Howlett --- diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 740715d5dad9..515d97a02882 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -512,11 +512,11 @@ struct mm_struct { * &struct mm_struct is freed. */ atomic_t mm_count; + int map_count; /* number of VMAs */ #ifdef CONFIG_MMU atomic_long_t pgtables_bytes; /* PTE page table pages */ #endif - int map_count; /* number of VMAs */ spinlock_t page_table_lock; /* Protects page tables and some * counters