2005-02-14 00:23:21

by Josh Aas

[permalink] [raw]
Subject: Linux 2.6.8.1 CPU Scheduler Documentation

Hello,

I have written an introduction to the Linux 2.6.8.1 CPU scheduler
implementation. It should help people to understand what is going on in
the scheduler code faster than they would be able to by just reading
through the code. The paper can be downloaded in PDF or LyX form from here:

http://josh.trancesoftware.com/linux/

This paper will never be "done," as I'd like to keep improving it over
time, and updating it to newer versions of the kernel as time allows. If
you have comments, suggestions, or corrections you'd like to make,
please email me. Technical corrections in particular would be
appreciated. Hopefully this can be as accurate and helpful as possible,
and will inspire more people to look into the Linux scheduler.

My employer, SGI, did not ask me to write this paper - it was done as
part of a school project last semester. While SGI owns the copyright to
the paper, they have allowed me to release it under the GNU FDL.

--
Josh Aas
Linux System Software
Silicon Graphics, Inc. (SGI)


2005-02-14 05:28:21

by Willy Tarreau

[permalink] [raw]
Subject: Re: Linux 2.6.8.1 CPU Scheduler Documentation

Hello Josh,

On Sun, Feb 13, 2005 at 06:23:15PM -0600, Josh Aas wrote:
> Hello,
>
> I have written an introduction to the Linux 2.6.8.1 CPU scheduler
> implementation. It should help people to understand what is going on in
> the scheduler code faster than they would be able to by just reading
> through the code. The paper can be downloaded in PDF or LyX form from
> here:
>
> http://josh.trancesoftware.com/linux/

This is quite an interesting documentation.

Howver, the pdf version shows a problem that most of us encountered when
distributing PDF documents written in latex : the fonts are blurred and
need to be zoomed in to be readable. This is because you used the default
latex fonts. You just have to switch to PS fonts and it will be fine. For
this, I often added one of the following lines in the latex headers :

\usepackage{times}
or
\usepackage{palatino}

I don't know how it must be translated into lyx, but you get the general idea.

Thanks anyway for this document which seems rather complete.

Regards,
Willy

2005-02-14 06:19:04

by Nick Piggin

[permalink] [raw]
Subject: Re: Linux 2.6.8.1 CPU Scheduler Documentation

On Mon, 2005-02-14 at 06:28 +0100, Willy Tarreau wrote:
> Hello Josh,
>
> On Sun, Feb 13, 2005 at 06:23:15PM -0600, Josh Aas wrote:
> > Hello,
> >
> > I have written an introduction to the Linux 2.6.8.1 CPU scheduler
> > implementation. It should help people to understand what is going on in
> > the scheduler code faster than they would be able to by just reading
> > through the code. The paper can be downloaded in PDF or LyX form from
> > here:
> >
> > http://josh.trancesoftware.com/linux/
>
> This is quite an interesting documentation.
>

The multiprocessor scheduling documentation looks pretty
accurate, at a quick glance. A few small things though:

I don't think you place enough emphasis on the per-CPU-ness
of the 2.6 scheduler. For most workloads, this probably
yields by far the biggest improvement over the 2.4 scheduler
on even small SMP systems, due to much less lock and cacheline
contention.

Secondly, 7.1.2 can probably be removed completely. We can
actually handle this type of SMT balancing correctly without
shared runqueues (and in an arguably nicer way).

Nick