Messages in this thread Patch in this message | | | Date | Thu, 14 Jun 2012 20:25:03 +0800 | Subject | [patch] BFS 421: remove mem barrier when setting task cpu | From | Hillf Danton <> |
| |
With runqueue lock held, update tasks cpu without mem barrier.
--- a/kernel/sched/bfs.c Thu Jun 14 20:05:42 2012 +++ b/kernel/sched/bfs.c Thu Jun 14 20:06:22 2012 @@ -1034,13 +1034,8 @@ void set_task_cpu(struct task_struct *p, if (task_cpu(p) != cpu) perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0);
- /* - * After ->cpu is set up to a new value, task_grq_lock(p, ...) can be - * successfully executed on another CPU. We must ensure that updates of - * per-task data have been completed by this moment. - */ - smp_wmb(); - task_thread_info(p)->cpu = cpu; + if (task_thread_info(p)->cpu != cpu) + task_thread_info(p)->cpu = cpu; }
static inline void clear_sticky(struct task_struct *p) --
| |