From 6dc2c994cf638366d2b11e084353cbf283cbc3f4 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Mon, 2 Nov 2020 12:34:31 -0500 Subject: [PATCH] mm_types: Drop more rb tree from vm_area Note: Need to fix NOMMU code Signed-off-by: Liam R. Howlett --- include/linux/mm_types.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d249fe7b5570..f8824e5a2156 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -274,7 +274,6 @@ typedef unsigned long vm_flags_t; * map parts of them. */ struct vm_region { - struct rb_node vm_rb; /* link in global region tree */ vm_flags_t vm_flags; /* VMA vm_flags */ unsigned long vm_start; /* start address of region */ unsigned long vm_end; /* region initialised to here */ @@ -312,19 +311,6 @@ struct vm_area_struct { /* linked list of VM areas per task, sorted by address */ struct vm_area_struct *vm_next, *vm_prev; - - struct rb_node vm_rb; - - /* - * Largest free memory gap in bytes to the left of this VMA. - * Either between this VMA and vma->vm_prev, or between one of the - * VMAs below us in the VMA rbtree and its ->vm_prev. This helps - * get_unmapped_area find a free area of the right size. - */ - unsigned long rb_subtree_gap; - - /* Second cache line starts here. */ - struct mm_struct *vm_mm; /* The address space we belong to. */ /* @@ -334,6 +320,11 @@ struct vm_area_struct { pgprot_t vm_page_prot; unsigned long vm_flags; /* Flags, see mm.h. */ + /* Information about our backing store: */ + unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE + units */ + /* Second cache line starts here. */ + struct file * vm_file; /* File we map to (can be NULL). */ /* * For areas with an address space and backing store, * linkage into the address_space->i_mmap interval tree. @@ -352,16 +343,14 @@ 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 */ + /* Third cache line starts here. */ /* Function pointers to deal with this struct. */ const struct vm_operations_struct *vm_ops; - /* Information about our backing store: */ - unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE - units */ - struct file * vm_file; /* File we map to (can be NULL). */ void * vm_private_data; /* was vm_pte (shared mem) */ + #ifdef CONFIG_SWAP atomic_long_t swap_readahead_info; #endif -- 2.50.1