diff options
author | Iulia Manda <iulia.manda21@gmail.com> | 2014-10-30 20:13:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-04 01:17:57 -0500 |
commit | 44dba3d5d6a10685fb15bd1954e62016334825e0 (patch) | |
tree | 6a0c9b0c34225a78263212037c69c87e97905211 /kernel/sched/core.c | |
parent | cad3bb32e181c286c46ec12b2deb1f26a6f9835d (diff) |
sched: Refactor task_struct to use numa_faults instead of numa_* pointers
This patch simplifies task_struct by removing the four numa_* pointers
in the same array and replacing them with the array pointer. By doing this,
on x86_64, the size of task_struct is reduced by 3 ulong pointers (24 bytes on
x86_64).
A new parameter is added to the task_faults_idx function so that it can return
an index to the correct offset, corresponding with the old precalculated
pointers.
All of the code in sched/ that depended on task_faults_idx and numa_* was
changed in order to match the new logic.
Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: mgorman@suse.de
Cc: dave@stgolabs.net
Cc: riel@redhat.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20141031001331.GA30662@winterfell
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index df0569ebec0f..72d9d926a034 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1857,8 +1857,7 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) | |||
1857 | p->numa_scan_seq = p->mm ? p->mm->numa_scan_seq : 0; | 1857 | p->numa_scan_seq = p->mm ? p->mm->numa_scan_seq : 0; |
1858 | p->numa_scan_period = sysctl_numa_balancing_scan_delay; | 1858 | p->numa_scan_period = sysctl_numa_balancing_scan_delay; |
1859 | p->numa_work.next = &p->numa_work; | 1859 | p->numa_work.next = &p->numa_work; |
1860 | p->numa_faults_memory = NULL; | 1860 | p->numa_faults = NULL; |
1861 | p->numa_faults_buffer_memory = NULL; | ||
1862 | p->last_task_numa_placement = 0; | 1861 | p->last_task_numa_placement = 0; |
1863 | p->last_sum_exec_runtime = 0; | 1862 | p->last_sum_exec_runtime = 0; |
1864 | 1863 | ||