From: dimm <dmitry.adamushko@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Subject: Re: [git] CFS-devel, group scheduler, fixes
Date: Tue, 18 Sep 2007 21:36:30 +0200 [thread overview]
Message-ID: <1190144190.5204.24.camel@earth> (raw)
[ well, don't expect to find here anything like RDCFS
(no, 'D' does not stand for 'dumb'!). I was focused
on more prosaic things in the mean time so just
didn't have time for writing it.. ]
here is a few cleanup/simplification/optimization(s)
based on the recent modifications in the sched-dev tree.
(1) optimize task_new_fair()
(2) simplify yield_task()
(3) rework enqueue/dequeue_entity() to get rid of
sched_class::set_curr_task()
additionally, the changes somewhat decrease code size:
text data bss dec hex filename
43538 5398 48 48984 bf58 build/kernel/sched.o.before
43250 5390 48 48688 be30 build/kernel/sched.o
(SMP + lots of debugging options but, I guess, in this case the diff
should remain visible for any combination).
---
(1)
due to the fact that we no longer keep the 'current' within the tree,
dequeue/enqueue_entity() is useless for the 'current' in task_new_fair().
We are about to reschedule and sched_class->put_prev_task() will put
the 'current' back into the tree, based on its new key.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
---
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 6e52d5a..5a244e2 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -969,10 +969,11 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
if (sysctl_sched_child_runs_first &&
curr->vruntime < se->vruntime) {
-
- dequeue_entity(cfs_rq, curr, 0);
+ /*
+ * Upon rescheduling, sched_class::put_prev_task() will place
+ * 'current' within the tree based on its new key value.
+ */
swap(curr->vruntime, se->vruntime);
- enqueue_entity(cfs_rq, curr, 0);
}
update_stats_enqueue(cfs_rq, se);
---
Dmitry
next reply other threads:[~2007-09-18 19:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-18 19:36 dimm [this message]
2007-09-18 20:16 ` [git] CFS-devel, group scheduler, fixes Ingo Molnar
2007-09-19 6:03 ` Tong Li
2007-09-19 6:28 ` Mike Galbraith
2007-09-19 7:51 ` Mike Galbraith
2007-09-19 8:42 ` Mike Galbraith
2007-09-19 17:06 ` Tong Li
2007-09-20 4:55 ` Mike Galbraith
2007-09-20 7:15 ` Mike Galbraith
2007-09-20 7:51 ` Ingo Molnar
2007-09-20 8:11 ` Mike Galbraith
2007-09-22 3:27 ` Tong Li
2007-09-22 10:01 ` Mike Galbraith
2007-09-23 7:14 ` Mike Galbraith
2007-09-23 11:37 ` Mike Galbraith
[not found] ` <20070923115847.GA13061@elte.hu>
2007-09-23 15:53 ` [git] CFS-devel, updates Mike Galbraith
2007-09-24 6:21 ` [git] CFS-devel, group scheduler, fixes Tong Li
2007-09-24 10:10 ` Mike Galbraith
2007-09-24 10:24 ` Peter Zijlstra
2007-09-24 10:42 ` Mike Galbraith
2007-09-24 11:08 ` Peter Zijlstra
2007-09-24 11:43 ` Mike Galbraith
2007-09-24 11:22 ` Mike Galbraith
2007-09-24 11:51 ` Peter Zijlstra
2007-09-24 16:43 ` Tong Li
2007-09-20 19:48 ` Willy Tarreau
2007-09-21 2:40 ` Mike Galbraith
2007-09-21 3:11 ` Willy Tarreau
2007-09-19 19:35 ` Siddha, Suresh B
2007-09-19 20:58 ` Tong Li
2007-09-18 20:22 ` Ingo Molnar
2007-09-19 3:55 ` Srivatsa Vaddagiri
-- strict thread matches above, loose matches on Subject: below --
2007-09-18 19:56 Dmitry Adamushko
2007-09-18 20:18 ` Ingo Molnar
2007-09-18 19:46 Dmitry Adamushko
2007-09-18 20:17 ` Ingo Molnar
2007-09-15 13:06 Ingo Molnar
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=1190144190.5204.24.camel@earth \
--to=dmitry.adamushko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.