Re: [PATCH] processes with shared vm

michael@optusnet.com.au
17 Aug 2001 22:26:25 +1000


Why not just print out the address of the 'mm_struct'?

That lets 'ps' treat the address as a cookie, and
thus count the number of occurences of each vm.

This has the additional advantages of:

* moving the intelligence out to the app
* reducing the kernel size, and
* make it easy to find out exactly which processes
are using which vm. (you just search for all occurences
of the cookie).

Michael.

Terje Eggestad <terje.eggestad@scali.no> writes:
> --=-L6iLOYILsDzljNLIi035
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> --- array.c.orig Mon Mar 19 21:34:55 2001
> +++ array.c Thu Aug 16 16:33:56 2001
> @@ -50,6 +50,12 @@
> * Al Viro & Jeff Garzik : moved most of the thing into base.c and
> * : proc_misc.c. The rest may eventually go into
> * : base.c too.
> + *
> + * Terje Eggestad : added in /proc/<pid>/status a VmClones: n
> + * : that tells how many proc that uses the same VM (mm_struct).
> + * : if there are clones add another field VmFirstClone with the
> + * : clone with the lowest pid. Needed for things like gtop that adds
> + * : mem usage of groups of proc, or else they add up the usage of threads.
> */
-
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/