From 54ea2f28c842eaabec52b96083a98f2151d665ce Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Fri, 3 Sep 2021 11:15:33 -0400 Subject: [PATCH] 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 --- include/linux/mm_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 740715d5dad9d..515d97a02882e 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 -- 2.50.1