diff options
author | Iulia Manda <iulia.manda21@gmail.com> | 2014-10-31 01:13:31 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-04 07:17:57 +0100 |
commit | 44dba3d5d6a10685fb15bd1954e62016334825e0 (patch) | |
tree | 6a0c9b0c34225a78263212037c69c87e97905211 /kernel/sched/sched.h | |
parent | sched/deadline: Don't check CONFIG_SMP in switched_from_dl() (diff) | |
download | linux-44dba3d5d6a10685fb15bd1954e62016334825e0.tar.xz linux-44dba3d5d6a10685fb15bd1954e62016334825e0.zip |
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/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 7e5c1eebc110..31f1e4d2996a 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -709,6 +709,13 @@ extern bool find_numa_distance(int distance); #endif #ifdef CONFIG_NUMA_BALANCING +/* The regions in numa_faults array from task_struct */ +enum numa_faults_stats { + NUMA_MEM = 0, + NUMA_CPU, + NUMA_MEMBUF, + NUMA_CPUBUF +}; extern void sched_setnuma(struct task_struct *p, int node); extern int migrate_task_to(struct task_struct *p, int cpu); extern int migrate_swap(struct task_struct *, struct task_struct *); |