On Mon, May 24, 2004 at 07:08:51PM +0200, Rafael Garcia-Suarez wrote: > Thread creation time and phases of the moon > Jamie Lokier remarked submitted a detailed bug report (#29637) about the > factors that might influence the creation time of a new thread. It > appears that it's "highly sensitive to conditions that shouldn't affect > the time": for example, changing the name of a subroutine, or even a > space in a comment. This seems to be related to the number of > mprotect(2) system calls issued during memory allocation. Those calls > come from the malloc() implementation used on the system. Jamie provided > enough clues to make Dave Mitchell find a solution: the bug was in the > function used to clone pointer tables. Thread cloning time is now > apparently faster by a 10% factor.
Just to clarify - I fixed a bug that would occasionally make thread creation 1000% slower than normal, and also did a slight enhancement that made all cloning ~10% faster. Two mostly unrelated fixes. The malloc() / mprotect() stuff turned out to be a red herring. -- A walk of a thousand miles begins with a single step... then continues for another 1,999,999 or so.
