Re: What I suspect

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sat, 11 Dec 1999 00:49:25 +0100


Linus Torvalds wrote:
> The problem is threads. Many of the above things are thread-specific, and
> you MUST NOT have different pages mapped in different threads, because
> that messes up the whole idea of threads (suddenly you cannot share
> the same page tables in an SMP environment etc)

Isn't that possible like this?

(a) Up to #CPUs page directories (only the pgds) per mm_struct.
The only difference is this special kernel page, which lives in
a single pgd entry.

(b) When switching between different threads on the same processor
(and only then), invlpg the page.

(c) To get really cocky I think you can use #CPUs/2 pgds and some
dubious segment tricks.

A fixed mapping that can provide even one thread-specific pointer would
be very cool.

-- Jamie

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