sched/fair: Kill task_struct::numa_entry and numa_group::task_list
authorKirill Tkhai <ktkhai@parallels.com>
Fri, 7 Nov 2014 11:07:36 +0000 (14:07 +0300)
committerIngo Molnar <mingo@kernel.org>
Sun, 16 Nov 2014 09:58:48 +0000 (10:58 +0100)
Nobody iterates over numa_group::task_list, this just confuses the readers.

Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1415358456.28592.17.camel@tkhai
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c
kernel/sched/fair.c

index 960f70402ecca7d56b834289d24fa484e580980f..3ccdce13484c0fc7b49b9b040d01845689752136 100644 (file)
@@ -1861,7 +1861,6 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
        p->last_task_numa_placement = 0;
        p->last_sum_exec_runtime = 0;
 
-       INIT_LIST_HEAD(&p->numa_entry);
        p->numa_group = NULL;
 #endif /* CONFIG_NUMA_BALANCING */
 }
index cf80643eb04d8a79df4441fd90bea8743fea5311..d11c57d651b024a2690fc13a3638e0cd8e60750a 100644 (file)
@@ -873,7 +873,6 @@ struct numa_group {
        spinlock_t lock; /* nr_tasks, tasks */
        int nr_tasks;
        pid_t gid;
-       struct list_head task_list;
 
        struct rcu_head rcu;
        nodemask_t active_nodes;
@@ -1906,7 +1905,6 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
 
                atomic_set(&grp->refcount, 1);
                spin_lock_init(&grp->lock);
-               INIT_LIST_HEAD(&grp->task_list);
                grp->gid = p->pid;
                /* Second half of the array tracks nids where faults happen */
                grp->faults_cpu = grp->faults + NR_NUMA_HINT_FAULT_TYPES *
@@ -1919,7 +1917,6 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
 
                grp->total_faults = p->total_numa_faults;
 
-               list_add(&p->numa_entry, &grp->task_list);
                grp->nr_tasks++;
                rcu_assign_pointer(p->numa_group, grp);
        }
@@ -1980,7 +1977,6 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
        my_grp->total_faults -= p->total_numa_faults;
        grp->total_faults += p->total_numa_faults;
 
-       list_move(&p->numa_entry, &grp->task_list);
        my_grp->nr_tasks--;
        grp->nr_tasks++;
 
@@ -2010,7 +2006,6 @@ void task_numa_free(struct task_struct *p)
                        grp->faults[i] -= p->numa_faults[i];
                grp->total_faults -= p->total_numa_faults;
 
-               list_del(&p->numa_entry);
                grp->nr_tasks--;
                spin_unlock_irqrestore(&grp->lock, flags);
                RCU_INIT_POINTER(p->numa_group, NULL);