]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Move cpu_vm_mask to be closer to mmu_context_t in struct mm
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:49:59 +0000 (18:49 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:49:59 +0000 (18:49 -0800)
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

index e77f1330d90bd130a285c564723f8ab62e0148a1..ac22951d5927c843251df02ebd4d2e21c30726c2 100644 (file)
@@ -204,7 +204,6 @@ struct mm_struct {
        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 */
 
@@ -212,6 +211,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;