]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm_types: Optimize mm_struct alignments
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 3 Sep 2021 15:15:33 +0000 (11:15 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 3 Sep 2021 15:15:33 +0000 (11:15 -0400)
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 <Liam.Howlett@oracle.com>
include/linux/mm_types.h

index 740715d5dad9d3b1d632815ed158ad331f46e7f5..515d97a02882ec1ce0d3b0eaebb051d500bd16d0 100644 (file)
@@ -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