[lkml]   [2001]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] processes with shared vm

--On Friday, August 17, 2001 10:46:59 +0200 Terje Eggestad
<> wrote:

> hought of all that, yes ps will have O(n^2) BUT ONLY FOR CLONED PROCS.
> How many cloned procs do you usually have????
> Even if I agree that there should be a linked list of all the cloned
> procs, it means major changes to the data structs in the kernel.
> With the number of threaded programs out there, this is "good enough".

There is a simpler way to do this. All tasks belong to a thread group, and
while thread groups are connected via a different clone flag
(CLONE_THREAD), in practice CLONE_THREAD and CLONE_VM are generally used
together. It would be trivial to add TGID to the information in /proc,
then assume all tasks with the same TGID have the same VM as well. It
would be just one more line in the /proc output and not require any
additional overhead.

Dave McCracken

Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059 T/L 678-3059

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.075 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site