Re: [PATCH 2.6.13.1] Patch for invisible threads

From: Sripathi Kodi
Date: Wed Sep 14 2005 - 19:30:40 EST


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.
-
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/