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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 2.6.13.1] Patch for invisible threads
- From: Sripathi Kodi <sripathik@in.ibm.com>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Andrew Morton <akpm@osdl.org>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Sripathi Kodi <sripathik@in.ibm.com>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Al Viro <viro@ZenIV.linux.org.uk>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Al Viro <viro@ZenIV.linux.org.uk>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Sripathi Kodi <sripathik@in.ibm.com>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Sripathi Kodi <sripathik@in.ibm.com>
- Re: [PATCH 2.6.13.1] Patch for invisible threads
- From: Bill Davidsen <davidsen@tmr.com>
- [PATCH 2.6.13.1] Patch for invisible threads
- Prev by Date: Re: Automatic Configuration of a Kernel
- Next by Date: Re: [PATCH 2.6.13.1] Patch for invisible threads
- Previous by thread: Re: [PATCH 2.6.13.1] Patch for invisible threads
- Next by thread: Re: [PATCH 2.6.13.1] Patch for invisible threads
- Index(es):
