lkml.org 
[lkml]   [2012]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[patch] BFS 421: remove mem barrier when setting task cpu
From
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)
--

\
 
 \ /
  Last update: 2012-06-14 15:01    [W:0.025 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site