From: Ingo Molnar <mingo@elte.hu>
To: Andreas Huber <andreas.huber@keymile.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mike Galbraith <efault@gmx.de>,
Dmitry Adamushko <dmitry.adamushko@gmail.com>
Subject: Re: Scheduler RR, first time slice wrong?
Date: Thu, 6 Nov 2008 08:44:50 +0100 [thread overview]
Message-ID: <20081106074449.GC8459@elte.hu> (raw)
In-Reply-To: <1225956167.4472.27.camel@chber1-10446x.ch.keymile.net>
(added Cc:s)
* Andreas Huber <andreas.huber@keymile.com> wrote:
> Hi,
>
> when starting a real-time process with the round-robin scheduler, the
> first time slice is set to HZ (1 second).
> When starting two such processes at the same time of the same static
> priority, the second one started is first executed after 1 second.
> (supposing the first process is heavy on cpu load).
> After both have exhausted this first time slice, it is set to
> DEF_TIMESLICE (which is 100ms).
>
> Is this behavior as it is supposed to be?
>
> Please add me in CC.
>
> Regards,
> Andreas
>
>
> Relevant parts in the code:
> include/linux/init_task.h
> #define INIT_TASK(tsk) \
> .rt = { \
> .time_slice = HZ,
>
> kernel/sched.c
> #define DEF_TIMESLICE (100 * HZ / 1000)
>
> kernel/sched_rt.c
> static void task_tick_rt(struct rq *rq, struct task_struct *p, int
> queued)
> if (--p->rt.time_slice)
> return;
>
> p->rt.time_slice = DEF_TIMESLICE;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2008-11-06 7:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 7:22 Scheduler RR, first time slice wrong? Andreas Huber
2008-11-06 7:44 ` Ingo Molnar [this message]
2008-11-06 8:46 ` Peter Zijlstra
2008-11-07 9:19 ` Ingo Oeser
2008-11-07 12:31 ` Peter Zijlstra
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=20081106074449.GC8459@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=andreas.huber@keymile.com \
--cc=dmitry.adamushko@gmail.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/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