summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar2017-02-03 11:03:31 +0100
committerIngo Molnar2017-03-02 08:42:25 +0100
commit314ff7851fc8ea66cbf48eaa93d8ebfb5ca084a9 (patch)
tree16567343faf3f9e94a56bbf431c1e54414cdbb6d /include/linux/sched.h
parentsched/headers, cgroups: Remove the threadgroup_change_*() wrappery (diff)
downloadkernel-qcow2-linux-314ff7851fc8ea66cbf48eaa93d8ebfb5ca084a9.tar.gz
kernel-qcow2-linux-314ff7851fc8ea66cbf48eaa93d8ebfb5ca084a9.tar.xz
kernel-qcow2-linux-314ff7851fc8ea66cbf48eaa93d8ebfb5ca084a9.zip
mm/vmacache, sched/headers: Introduce 'struct vmacache' and move it from <linux/sched.h> to <linux/mm_types>
The <linux/sched.h> header includes various vmacache related defines, which are arguably misplaced. Move them to mm_types.h and minimize the sched.h impact by putting all task vmacache state into a new 'struct vmacache' structure. No change in functionality. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3f61baac928b..e87c97e1a947 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -134,10 +134,6 @@ struct blk_plug;
struct filename;
struct nameidata;
-#define VMACACHE_BITS 2
-#define VMACACHE_SIZE (1U << VMACACHE_BITS)
-#define VMACACHE_MASK (VMACACHE_SIZE - 1)
-
/*
* These are the constant used to fake the fixed-point load-average
* counting. Some notes:
@@ -1550,9 +1546,10 @@ struct task_struct {
#endif
struct mm_struct *mm, *active_mm;
- /* per-thread vma caching */
- u32 vmacache_seqnum;
- struct vm_area_struct *vmacache[VMACACHE_SIZE];
+
+ /* Per-thread vma caching: */
+ struct vmacache vmacache;
+
#if defined(SPLIT_RSS_COUNTING)
struct task_rss_stat rss_stat;
#endif