Re: Per-Processor Data Paget

Andi Kleen (ak@suse.de)
Tue, 14 Dec 1999 03:30:58 +0100


Hallo Scott

On Mon, Dec 13, 1999 at 05:46:23PM -0800, Scott Lurndal wrote:
> Most commercial applications are written to use the
> standard POSIX API for both portability and functionality
> reasons (I point out Oracle, for instance).
>
> To which do you prefer to cater? A small set of linux-only applications
> or a much richer and larger set of commercial applications?

I prefer to cater to all. The key to that is a low latency thread switch.

>
> >
> > >
> > > > to tolerate paging latencies on mmap'ed files or for sendfile. For that it
> > > > makes sense to have a lot of threads per process on a single CPU, even on
> > > > a big multi CPU machine.
> > >
> > > Of course, but on a big multiCPU machine, it is not probable that two
> > > consecutively dispatched threads will be from the same address space.
> >
> > WIth the current Linux scheduler it definitely is.
>
> I'm not so sure about this. With the exception of cache
> affinity scheduling, in which case you want the _same_ thread
> to be rescheduled on the processor, there will generally
> be more than one thread ready-to-run, and they should be
> run in a standard round-robin scheduling mechanism, and they
> will generally be from different processes (and address spaces).
>
> Typically, significant oracle workloads (OLTP or Decision Support)
> operate this way.

I have no doubt that you're right for , but Linux is not only optimized for
Oracle workloads, it is used as a desktop operation system too. On multi
threaded GUI apps (I point out Mozilla as an example) you usually switch
into the same address space. And people use SMP machines for the desktop.

Now you could argue that a hybrid user/kernel threading like on Solaris
is better for these apps, but that would lead to much more complexity which
is bad for speed in the long time. One of the beauties of the current
Linux Threads setup (even with all its problems) is its simplicity.

I just have my doubts that per thread mapping is worth paying that price.

> Pathological applications can be build that do this, but it isn't generally
> the case.

I wouldn't call Mozilla pathological.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/