Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Prior to the Linux 2.6 kernel, struct task_struct was present at the end of the kernel stack of each process. There was no thread_info struct concept. But in Linux 2.6 kernel, instead of task_struct being placed at the end of the kernel stack for the process, the thread_info struct is placed at the end. This thread_info struct contains a pointer to the task_struct structure.

What was the need for thread_info structure to be introduced ?. We could have accessed the task_struct structure using the stack pointer directly if task_struct was placed at the end of the kernel stack of the process.

In 2.6 Kernel, task_struct is dynamically allocated using slab_allocator. Prior to 2.6 Kernel, was it statically allocated?

share|improve this question
Try searching for an explanation on LWN. Most major kernel changes get an explanatory write-up on LWN. – Gilles May 26 '11 at 22:07

1 Answer

I am not sure why this was done. But it'd be easy to find it out if you do a git blame on that file and find the commit that introduced the change. Usually commit message will have very detailed explanation of the change being committed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.