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] [day] [month] [year] [list]
Date:	Mon, 22 Sep 2008 18:18:55 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Martin Steigerwald <ms@...mix.de>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: documentation about scheduling policies

On Mon, 2008-09-22 at 17:29 +0200, Martin Steigerwald wrote:
> Please CC to me as I am not subscribed to linux-kernel.
> 
> 
> Hi!
> 
> I wonder about scheduling policies in CFS. I find these:
> 
> ms@...go> grep "case SCHED_" sched.c sched_fair.c | sort | uniq 
> ~/lokal/Kernel/linux-2.6.26/kernel
> sched.c:        case SCHED_BATCH:
> sched.c:        case SCHED_FIFO:
> sched.c:        case SCHED_IDLE:
> sched.c:        case SCHED_NORMAL:
> sched.c:        case SCHED_RR:
> 
> sched_fair.c seems to differentiate SCHED_PATCH only:
> 
> ms@...go> egrep "(SCHED_I|SCHED_B)" sched_fair.c                       
> ~/lokal/Kernel/linux-2.6.26/kernel
>  * Completely Fair Scheduling (CFS) Class (SCHED_NORMAL/SCHED_BATCH)
>         if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) 
> {
>         if (unlikely(p->policy == SCHED_BATCH))
> 
> 
> The documentation on scheduling policies in Documentation/scheduler appears 
> rather scarse to me.

> I am willing to create documentation patches provided someone explains these 
> to me ;-).

SCHED_NORMAL (traditionally called SCHED_OTHER)
SCHED_BATCH
SCHED_IDLE

are all implemented in sched_fair.c which constitute a proportional fair
scheduler.

SCHED_BATCH differentiates itself by not preempting nearly as often as
regular tasks would, thereby allowing tasks to run longer and make
better use of caches but at the cost of interactivity.

SCHED_IDLE is basically an even weaker nice 19, its not a true idle time
scheduler because we can easily get into priority inversion problems
with that which would deadlock the machine.

SCHED_FIFO/_RR are implemented in sched_rt.c and are as specified by
POSIX.

--
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