lkml.org 
[lkml]   [2014]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: Transform resched_task() into resched_curr()
On 29.06.2014 12:36, Andreas Mohr wrote:
> Hi,
>
> On Sun, Jun 29, 2014 at 11:57:49AM +0400, Kirill Tkhai wrote:
>> resched_curr(rq) means "to reschedule current task of the rq". It does
>> not reschedule rq itself.
>>
>> We already have resched_cpu(), which has cpu agrument, and it's not
>> a task. I think this is just a similar case and we won't have any
>> problems because of this.
>>
>> We only can reschedule the current task, and the patch underlines that fact.
>
> OK. I was arguing almost purely mechanically, and from a mechanical POV
> I had some doubts.
>
> I just noticed that there is a part touching rq->idle,
> and ISTR that idle task handling is "special"
> (after all that's the power management side of things).
> Specifically, rq->curr and rq->idle are distinct rq members
> (since they are distinct tasks AFAIK!),
> so there might now be some issues with task state tracking here
> (unless this cleanup happens to unify handling here anyway).

Are you worrying about check_preempt_curr_idle()? I've looked
at check_preempt_curr() and found, we never call this function
in current scheduler logic.

It's called only if just enqueued task is of the same class as
rq's current, but we can't have two idle class tasks enqueued
on the same rq. So, it's just a stub. We can do not worry
about this.

Thanks,
Kirill


\
 
 \ /
  Last update: 2014-06-29 11:21    [W:0.036 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site