[lkml]   [2011]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched: resched proper CPU on yield_to
On Tue, Mar 1, 2011 at 7:33 PM, Rik van Riel <> wrote:
> On 03/01/2011 07:28 PM, Venkatesh Pallipadi wrote:
>> yield_to_task_fair() has code to resched the CPU of yielding task when the
>> intention is to resched the CPU of the task that is being yielded to.
>> Change here fixes the problem and also makes the resched conditional on
>> rq != p_rq.
> That would result in not rescheduling when current and p are
> on the same runqueue, in effect making yield_to a noop for the
> easiest case...
> When rq != p_rq, we need to ensure both get rescheduled.

Yes. There is a schedule() right after this change which should take
care or resched on current CPU. Thats the reason I thought of skipping
resched on current CPU. No?


> We want to have current not run right now (because it is waiting
> on a resource that's not available), and we do want p to run.
> I'm about to fall over, so I'll go to sleep now.
> I can send a patch tomorrow morning, unless you beat me to it :)
> --
> All rights reversed

 \ /
  Last update: 2011-03-02 04:39    [W:0.074 / U:28.192 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site