Re: Per-Processor Data Paget

Scott Lurndal (slurn@griffin.engr.sgi.com)
Mon, 13 Dec 1999 17:46:23 -0800 (PST)


> On Mon, Dec 13, 1999 at 04:47:36PM -0800, Scott Lurndal wrote:
> > > slurn@griffin.engr.sgi.com (Scott Lurndal) writes:
> > >
> > > >
> > > > And what percentage of the time does a thread in the same address space
> > > > get scheduled on a single processor.
> > >
> > > Also lots of apps simply rely on kernel thread for IO context. Aio is
> > > implemented in glibc using cloned threads. Other programs use them e.g.
> >
> > There are additional forms of aio (much lower overhead) that don't rely
> > on threads.
>
> ... which assumes that all programs are rewriten to use them first (a lot
> of programs on Linux don't use the aio_* API, but use their threads to eat
> mmap latencies etc.)

Tag Andi,

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?

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

>
> Do you have numbers on Irix that show otherwise?

Not that I can share at this time, I'll look around for some. But the
concensus amongst the kernel developers is that with any form of
substantial workload, there will seldom be multiple threads from the
same process scheduled consecutively on the same processor.

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

Tschuss,

scott

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