Re: Question regarding thread_struct
From: Robert Love
Date: Tue Mar 08 2005 - 12:22:02 EST
On Tue, 2005-03-08 at 22:34 +0530, Imanpreet Arora wrote:
> I am wondering if someone could provide information as to how
> thread_struct is kept in memory. Robert Love mentions that it is kept
> at the "lowest" kernel address in case of x86 based platform. Could
> anyone answer these questions.
Kernel _stack_ address for the given process.
> a) When a stack is resized, is the thread_struct structure copied onto
> a new place?
This is the kernel stack, not any potential user-space stack. Kernel
stacks are not resized.
> b) What is the advantage of this scheme as against a fixed "virtual-address"?
This is inside of the kernel, not in user-space.
> c) Also could you kindly point the relevant files which do all this
> stuff "shed.c"(?)
See kernel/fork.c and alloc_thread_info() and friends in
<asm/thread_info.h>.
Robert Love
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/