lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081106074449.GC8459@elte.hu>
Date:	Thu, 6 Nov 2008 08:44:50 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andreas Huber <andreas.huber@...mile.com>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mike Galbraith <efault@....de>,
	Dmitry Adamushko <dmitry.adamushko@...il.com>
Subject: Re: Scheduler RR, first time slice wrong?


(added Cc:s)

* Andreas Huber <andreas.huber@...mile.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@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ