From: Jack Steiner <steiner@sgi.com>

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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN include/linux/sched.h~move-cpu_vm_mask include/linux/sched.h
--- 25/include/linux/sched.h~move-cpu_vm_mask	2004-01-30 09:08:14.000000000 -0800
+++ 25-akpm/include/linux/sched.h	2004-01-30 09:08:14.000000000 -0800
@@ -206,7 +206,6 @@ struct mm_struct {
 	unsigned long rss, total_vm, locked_vm;
 	unsigned long def_flags;
 	unsigned long rlimit_rss;
-	cpumask_t cpu_vm_mask;
 
 	unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
 
@@ -214,6 +213,8 @@ struct mm_struct {
 #ifdef CONFIG_HUGETLB_PAGE
 	int used_hugetlb;
 #endif
+	cpumask_t cpu_vm_mask;
+
 	/* Architecture-specific MM context */
 	mm_context_t context;
 

_