Re: [PATCH 2.6.13.1] Patch for invisible threads

Sripathi Kodi
2005-09-15T00:30:24Z

Bill Davidsen wrote:
>
> Let me say that this solution, and any other which loops through all
> threads of a task, isn't going to scale well. I don't have a magic O(1)
> solution, if it were easy someone would have done that instead of the
> while loop, just noting that a clever solution would be a win on servers.

Bill,

We will only have to go through the while loop in rare cases where main
thread has done pthread_exit() before other threads (and hence it's task->fs
is null). Also, even in most such cases, the very first iteration through
the while loop will get us the 'fs' pointer, so we won't have to loop
through all threads. So I think this won't have scalability problem. Am I right?

Thanks,
Sripathi.