[Top] [All Lists]

Re: thread-ready ABIs

To: "Kevin D. Kissell" <>
Subject: Re: thread-ready ABIs
From: Daniel Jacobowitz <>
Date: Tue, 22 Jan 2002 10:21:28 -0500
Cc: Dominic Sweetman <>, Ralf Baechle <>, Ulrich Drepper <>, Mike Uhler <>, "MIPS/Linux List (SGI)" <>, GNU libc hacker <>, "H . J . Lu" <>
In-reply-to: <002001c1a33e$d9936560$0deca8c0@Ulysses>
References: <m3elkoa5dw.fsf@myware.mynet><><01b801c1a081$3f6518e0$0deca8c0@Ulysses><><m3d703thl6.fsf@myware.mynet><01be01c1a2d7$6ec299c0$0deca8c0@Ulysses> <> <002001c1a33e$d9936560$0deca8c0@Ulysses>
User-agent: Mutt/1.3.23i
On Tue, Jan 22, 2002 at 01:18:03PM +0100, Kevin D. Kissell wrote:
> I think that the problem is complicated by the fact that
> there may be a many->many mapping of kernel threads
> (and CPUs) to user-land threads.  In that case, no single
> low-memory address can be correct for all kernel threads.
> However, since every kernel thread should have its own
> stack segment, it would appear to me that having a
> variable "under" the stack would satisfy the need for
> per-kernel-thread storage at a knowable location.
> I suspect that there is a second-order problem in that
> the base stack address may differ for instances of
> the same binary launched under different circumstances.
> But I don't think that renders the problem impossible.
> One could have a global pointer, resolvable at link
> time, which could be set to SP+delta by whatever
> we call crt0 these days, and which should provide the
> required semantics.  Each user thread startup or 

Resolvable at link time and set by crt0 seem to be mutually
exclusive... but perhaps I'm misunderstanding you.

In any case, that's not the real problem.  Linux user threads do not
have true separate stacks.  They share their _entire_ address space;
the stacks are all bounded (default is 2MB) and grouped together at the
top of the available memory region.

Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

<Prev in Thread] Current Thread [Next in Thread>