Subject: Re: Arch-specific maxproc limit?
To: John Kohl <jtk@kolvir.arlington.ma.us>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: port-i386
Date: 12/15/2002 23:15:13
On Sun, Dec 15, 2002 at 12:37:57AM -0500, John Kohl wrote:
> Would it make sense on the i386 port not to use a GDT slot for a process
> which is not running or runnable?  If the TSS and LDT base slots are
> only used while the process is in the run state (and yielded when the
> process sleeps), we could theoretically support more processes.
> Complexity?  Performance impact of reloading GDT slots?  I don't know
> offhand...

Yeah, that thought came to me as well. Since we have a per-CPU GDT,
in which at least one slot is private already (for per-CPU data),
that notion can easily be extended to the TSS for the current process,
and the LDT for the current process (if it's not the default one),
since you have only one of those active at all times. There is
no extra cost, since task register load, and LDT load iff a process
has a seperate LDT, are already done once per context switch.

Once nathanw_sa is merged, I'm going to overhaul the i386 code, so
I'll certainly address this issue, it is a good suggestion.

- Frank

-- 
Frank van der Linden                                    fvdl@wasabisystems.com
==============================================================================
Quality NetBSD Development, Support & Service.   http://www.wasabisystems.com/