Re: newly released clone() based pthreads package

Alan Cox (alan@cymru.net)
Wed, 24 Jul 1996 09:26:09 +0100 (BST)


> There are probably some changes that could be made to the kernel to
> lower the overhead of switching between two threads of the same
> process. The one that I can think of is sharing of all thread invariant

Not a lot.

> task_struct data. When the clone() ( do_fork() ) routine is called

It does. Why do you think it has pointers to the mm struct. A thread->thread
switch with the VM shared is very fast. The kernel doesnt need to do any
page table work and the ix86 optimises a reload of the page table registers
on task switch if the new and old tables are the same.

Alan