Re: Per-Processor Data Paget

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Fri, 10 Dec 1999 01:35:28 +0100 (CET)


On Thu, 9 Dec 1999, Scott Lurndal wrote:

> Since only one level 2 page table will be different between threads
> running in the same address space, and that page table only describes
> kernel virtual addresses, in a region where no changes will be made
> during system operations to the page table, I believe the additional
> cost for clone will be much less (while the page directories will be
> different, all but one page tables would be shared).

a full page has to be copied at clone() time - this is the cost increase i
was talking about.

per-processor private data structures are not at all impossible. We can
use smp_processor_id() as an index, it's not expensive at all. It's not as
cheap as a constant address.

plus i consider NxM threading models, where N ~== nr_cpus, inferior.
Event-driven models, client-server workloads are so much easier to handle
with pure threads, without any user-space threading kludge. And the
TLB-switch overhead with many pure threads, in a frequently rescheduling
system isnt all that insignificant, and this cost scales linearly with the
number of TLBs. (ie. gets slower on better x86 CPUs.) The main reason for
NxM models was that creating/having many threads around was not cheap, and
context switching wasnt cheap either.

-- mingo

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