Subject: Re: per-cpu TSS
To: Charles M. Hannum <abuse@spamalicious.com>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 11/13/2003 17:55:28
> Uh, "sort of".  You only need a kernel stack *per process* because we always 
> store state on the state when we switch.  We can arrange (cf. later versions 
> of Mach) to not do so in many cases, and instead have a kernel stack per CPU 
> most of the time.  This would be especially beneficial for threads, as would 
> it remove 8k of per-LWP overhead.

Surely you can only do that if you switch out a process running in userspace.
Most processes are blocked in the bowels of the kernel and have far too much
kernel state to keep anywhere else.

You don't really want to start with system call restart on every process
switch.

In any case 1000 processes by 8k is 'only' 8MB.

For threads and LWPs the m-n implementation (presumably) means that threads
waiting on other threads don't have an LWP.

	David

-- 
David Laight: david@l8s.co.uk