lkml.org 
[lkml]   [2014]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] sched: make finish_task_switch() return struct rq *
On Thu, Oct 09, 2014 at 09:32:32PM +0200, Oleg Nesterov wrote:
> @@ -2802,15 +2802,8 @@ need_resched:
> rq->curr = next;
> ++*switch_count;
>
> - context_switch(rq, prev, next); /* unlocks the rq */
> - /*
> - * The context switch have flipped the stack from under us
> - * and restored the local variables which were saved when
> - * this task called schedule() in the past. prev == current
> - * is still correct, but it can be moved to another cpu/rq.
> - */
> - cpu = smp_processor_id();
> - rq = cpu_rq(cpu);
> + rq = context_switch(rq, prev, next); /* unlocks the rq */
> + cpu = rq->cpu;

This won't compile on UP, cpu_of(rq) works though.


\
 
 \ /
  Last update: 2014-10-10 12:42    [W:0.451 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site