[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b647ffbd0709110253y7d9564c4j88aa134330e2a292@mail.gmail.com>
Date: Tue, 11 Sep 2007 11:53:51 +0200
From: "Dmitry Adamushko" <dmitry.adamushko@...il.com>
To: vatsa@...ux.vnet.ibm.com
Cc: "Andrew Morton" <akpm@...ux-foundation.org>,
ckrm-tech@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
containers@...ts.osdl.org,
"Jan Engelhardt" <jengelh@...putergmbh.de>,
"Ingo Molnar" <mingo@...e.hu>, dhaval@...ux.vnet.ibm.com,
menage@...gle.com
Subject: Re: [PATCH] Hookup group-scheduler with task container infrastructure
On 11/09/2007, Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com> wrote:
>
> [ ... ]
I guess, 'rq->curr == tsk' implies a task was on the 'rq' (before
dequeueing) in this particular case. What's about a minor optimization
like below (plus, let's make use of task_running()):
[ btw., real-time task can be also added to a container, right? I
guess, it can be used at least for group-aware load-balancing of
rt_tasks... otherwise, I guess, cpu-resource controlling is not that
applicable to, say, SCHED_FIFO :-)
Anyway, to this goal rt_task should become aware of group-related bits
of the 'struct sched_entity'... and at the moment, the code below is
effectively just a 'nop' for them.. right? ]
/* change task's runqueue when it moves between groups */
static void sched_move_task(struct container_subsys *ss, struct container *cont,
struct container *old_cont, struct task_struct *tsk)
{
int on_rq, running;
unsigned long flags;
struct rq *rq;
rq = task_rq_lock(tsk, &flags);
update_rq_clock(rq);
running = task_running(rq, tsk);
on_rq = tsk->se.on_rq;
if (on_rq) {
dequeue_task(rq, tsk, 0);
if (unlikely(running) && tsk->sched_class == &fair_sched_class)
tsk->sched_class->put_prev_task(rq, tsk);
}
set_task_cfs_rq(tsk);
if (on_rq) {
enqueue_task(rq, tsk, 0);
if (unlikely(running) && tsk->sched_class == &fair_sched_class)
tsk->sched_class->set_curr_task(rq);
}
task_rq_unlock(rq, &flags);
}
> --
> Regards,
> vatsa
>
--
Best regards,
Dmitry Adamushko
-
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