Skip to contentSkip to conversation

- Move cpu_vm_mask to be closer to mmu_context_t in struct mm

PATCH New Jack Steiner 1 participant 1 message Jan 29, 2004 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 - Move cpu_vm_mask to be closer to mmu_context_t in struct mm

The cpu_vm_mask use to be close to the mmu_context_t field in the mm struct. Recently some large members were added between "cpu_vm_mask" and "context". I suspect that was an oversight.

Here is a patch that puts the fields close together. This makes it likely that both fields are in the same cache line. Since both fields are likely to be updated at the same time, this may improve performance.

./include/linux/sched.h +2 -1
@@ -206,7 +206,6 @@
 	unsigned long arg_start, arg_end, env_start, env_end;
 	unsigned long rss, total_vm, locked_vm;
 	unsigned long def_flags;
-	cpumask_t cpu_vm_mask;
 
 	unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
 
@@ -214,6 +213,8 @@
 #ifdef CONFIG_HUGETLB_PAGE
 	int used_hugetlb;
 #endif
+	cpumask_t cpu_vm_mask;
+
 	/* Architecture-specific MM context */
 	mm_context_t context;
 
Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.