Re: [PATCH] sched: Transform resched_task() into resched_curr()

From: Andreas Mohr
Date: Sun Jun 29 2014 - 04:36:39 EST


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).

Thanks,

Andreas Mohr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/