Date: Fri, 1 Feb 2002 09:03:09 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: Terry Lambert <tlambert2@mindspring.com> Cc: Julian Elischer <julian@elischer.org>, arch@FreeBSD.ORG Subject: Re: FWIW... maybe this way already? Message-ID: <Pine.GSO.4.10.10202010858440.6066-100000@pcnet1.pcnet.com> In-Reply-To: <3C5A4E44.6380900B@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Feb 2002, Terry Lambert wrote: > Linux did what I think is an incredibly clever thing. > > They put the current CPU at the beginning of the stack, > and then change it when/if they migrate the process. The beginning of what stack? Each thread has its own stack that doesn't have to be the same size and stuff. We plan on using %gs for a pointer to a per-KSE or per-thread chunk of memory (and we could put anything in there). > Since KSEs have stacks, as well, you could put the > process and thread ID after the CPU ID, there. > > Saves weirding out a register to get the CPU, PID, TID, > since the stack base is always known. How is the stack base always known in a threaded process? Well, you know the process stack base, but that doesn't help. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10202010858440.6066-100000>