mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mitchell Erblich" <erblichs@earthlink.net>
To: "\"Linux Kernel Mailing List\"" <linux-kernel@vger.kernel.org>
Cc: "\"Ingo Molnar\"" <mingo@elte.hu>,
	"\"\\\"Dmitry Adamushko\\\"\"" <dmitry.adamushko@gmail.com>
Subject: QUESTION: RT & SCHED & fork: ?MISSING EQUIV of task_new_fair for RT tasks.
Date: Tue, 14 Aug 2007 12:28:02 -0700	[thread overview]
Message-ID: <000501c7dea9$3bfca1c0$6501a8c0@earthlink.net> (raw)

Group, Ingo Molnar, etc,

Why does the rt sched_class contain fewer elements than fair?
missing is the RT for .task_new.

called by do_fork(): fork.c , which calls wake_up_new_task() via
if (!(clone_flags & CLONE_STOPPED))
      wake_up_new_task(p, clone_flags);

which is in sched.c and calls
if (!p->sched_class->task_new ||

       and
 p->sched_class->task_new(rq, p, now);


sched_rt.c:
static struct sched_class rt_sched_class __read_mostly = {
217         .enqueue_task           = enqueue_task_rt,
218         .dequeue_task           = dequeue_task_rt,
219         .yield_task             = yield_task_rt,
220 
221         .check_preempt_curr     = check_preempt_curr_rt,
222 
223         .pick_next_task         = pick_next_task_rt,
224         .put_prev_task          = put_prev_task_rt,
225 
226         .load_balance           = load_balance_rt,
227 
228         .task_tick              = task_tick_rt,
229 };


sched_fair.c:
struct sched_class fair_sched_class __read_mostly = {
1075         .enqueue_task           = enqueue_task_fair,
1076         .dequeue_task           = dequeue_task_fair,
1077         .yield_task             = yield_task_fair,
1078 
1079         .check_preempt_curr     = check_preempt_curr_fair,
1080 
1081         .pick_next_task         = pick_next_task_fair,
1082         .put_prev_task          = put_prev_task_fair,
1083 
1084         .load_balance           = load_balance_fair,
1085 
1086         .set_curr_task          = set_curr_task_fair,
1087         .task_tick              = task_tick_fair,
1088         .task_new               = task_new_fair,
1089 };
1090 

The missing rt equivalent item is:
/*
1014  * Share the fairness runtime between parent and child, thus the
1015  * total amount of pressure for CPU stays equal - new tasks
1016  * get a chance to run but frequent forkers are not allowed to
1017  * monopolize the CPU. Note: the parent runqueue is locked,
1018  * the child is not running yet.
1019  */
1020 static void task_new_fair(struct rq *rq, struct task_struct *p)
1021 {

Mitchell Erblich


             reply	other threads:[~2007-08-14 19:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 19:28 Mitchell Erblich [this message]
2007-08-15  5:33 ` Mike Galbraith

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='000501c7dea9$3bfca1c0$6501a8c0@earthlink.net' \
    --to=erblichs@earthlink.net \
    --cc=dmitry.adamushko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®