mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: vatsa@linux.vnet.ibm.com
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	ckrm-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org,
	"Jan Engelhardt" <jengelh@computergmbh.de>,
	"Ingo Molnar" <mingo@elte.hu>,
	dhaval@linux.vnet.ibm.com, menage@google.com
Subject: Re: [PATCH] Hookup group-scheduler with task container infrastructure
Date: Tue, 11 Sep 2007 11:53:51 +0200	[thread overview]
Message-ID: <b647ffbd0709110253y7d9564c4j88aa134330e2a292@mail.gmail.com> (raw)
In-Reply-To: <20070911044145.GC16222@linux.vnet.ibm.com>

On 11/09/2007, Srivatsa Vaddagiri <vatsa@linux.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

  reply	other threads:[~2007-09-11  9:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 17:10 Srivatsa Vaddagiri
2007-09-10 17:05 ` Jan Engelhardt
2007-09-10 17:23   ` Srivatsa Vaddagiri
2007-09-10 17:22     ` Andrew Morton
2007-09-10 17:41       ` Jan Engelhardt
2007-09-10 17:46       ` Srivatsa Vaddagiri
2007-09-10 22:28         ` Dmitry Adamushko
2007-09-11  4:41           ` Srivatsa Vaddagiri
2007-09-11  9:53             ` Dmitry Adamushko [this message]
2007-09-12 11:42               ` Srivatsa Vaddagiri
2007-09-12 12:10                 ` Srivatsa Vaddagiri
2007-09-12 16:25                 ` Dmitry Adamushko
2007-09-13 12:33                   ` Srivatsa Vaddagiri
2007-09-14  9:41                     ` Ingo Molnar
2007-09-14 15:59                       ` Srivatsa Vaddagiri
2007-09-14 16:22                         ` Srivatsa Vaddagiri
2007-09-10 22:37         ` Dmitry Adamushko
2007-09-10 22:45           ` Paul Menage
2007-09-11  7:20             ` Cedric Le Goater
2007-09-11 15:22               ` Randy Dunlap
2007-09-11 15:37                 ` Jan Engelhardt
2007-09-11 15:51                 ` Srivatsa Vaddagiri
2007-09-11 15:53                   ` Randy Dunlap
2007-09-11 15:44               ` Paul Menage
2007-09-10 17:28     ` Srivatsa Vaddagiri
2007-09-10 17:42       ` Jan Engelhardt
2007-09-10 18:38     ` [Devel] " Paul Menage
2007-09-11  4:44       ` Srivatsa Vaddagiri
2007-09-18  8:19 ` KAMEZAWA Hiroyuki
2007-09-18 10:44   ` Srivatsa Vaddagiri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b647ffbd0709110253y7d9564c4j88aa134330e2a292@mail.gmail.com \
    --to=dmitry.adamushko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=containers@lists.osdl.org \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®