Re: [PATCH] processes with shared vm

Andi Kleen (ak@suse.de)
Fri, 17 Aug 2001 22:55:37 +0200


On Fri, Aug 17, 2001 at 09:26:10AM -0500, Dave McCracken wrote:
> 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.

Even with a tgid you would need some way to avoid its counter wrapping
and getting reused. I think reusing the pid and pid hash for that is
cheaper. Also gtop should display correct results even with the programs
that don't use CLONE_THREAD.

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