[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060821164553.GA21130@in.ibm.com>
Date: Mon, 21 Aug 2006 22:15:53 +0530
From: Srivatsa Vaddagiri <vatsa@...ibm.com>
To: Mike Galbraith <efault@....de>
Cc: Ingo Molnar <mingo@...e.hu>, Nick Piggin <nickpiggin@...oo.com.au>,
Sam Vilain <sam@...ain.net>, linux-kernel@...r.kernel.org,
Kirill Korotaev <dev@...nvz.org>,
Balbir Singh <balbir@...ibm.com>, sekharan@...ibm.com,
Andrew Morton <akpm@...l.org>, nagar@...son.ibm.com,
matthltc@...ibm.com, dipankar@...ibm.com
Subject: Re: [PATCH 0/7] CPU controller - V1
On Mon, Aug 21, 2006 at 05:10:41PM +0000, Mike Galbraith wrote:
> I must be missing something. If current and awakening tasks have
> separate runqueues, task_rq(awakening)->curr != current. We won't look
> at current->prio, so won't resched(current).
Ok ..we have two types of runqueues here:
1. struct task_grp_rq
per-task-group-per-cpu runqueue, which holds ready-to-run tasks
belonging to the group in active and expired arrays.
2. struct rq
per-cpu runqueue, which holds ready-to-run task-groups in active and
expired arrays. This structure also holds some members like
curr, nr_running etc which more or less have the same significance as
the current runqueue members.
task_rq(tsk) still extracts "struct rq", while
task_grp(tsk)->rq[task_cpu(tsk)] extracts "struct task_grp_rq".
Hence task_rq(awakening)->curr == current, which should be sufficient to
resched(current), although I think there is a bug in current code
(irrespective of these patches):
try_to_wake_up() :
...
if (!sync || cpu != this_cpu) {
if (TASK_PREEMPTS_CURR(p, rq))
resched_task(rq->curr);
}
success = 1;
...
TASK_PREEMPTS_CURR() is examined and resched_task() is called only if
(cpu != this_cpu). What about the case (cpu == this_cpu) - who will
call resched_task() on current? I had expected the back-end of interrupt
handling to do that, but didnt find any code to do so.
--
Regards,
vatsa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists