From owner-freebsd-arch Fri Feb 1 6: 3:13 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 602E037B404 for ; Fri, 1 Feb 2002 06:03:10 -0800 (PST) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.1/8.12.1) with ESMTP id g11E39hV008740; Fri, 1 Feb 2002 09:03:09 -0500 (EST) Date: Fri, 1 Feb 2002 09:03:09 -0500 (EST) From: Daniel Eischen To: Terry Lambert Cc: Julian Elischer , arch@FreeBSD.ORG Subject: Re: FWIW... maybe this way already? In-Reply-To: <3C5A4E44.6380900B@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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