[PATCH] processes with shared vm

From: Terje Eggestad (terje.eggestad@scali.no)
Date: Fri Aug 17 2001 - 02:50:06 EST


I figured out that it's difficult to find out from /proc
which processes that share VM (created with clone(CLONE_VM)).

made a patch that adds in /proc/<pid>/status a VmClones field that tells
how many proc that uses the same VM (mm_struct). if there are clones I
add another field VmFirstClone with the pid of 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 SIZE and RSS of threads.

The patch need to be applied to linux/fs/proc/array.c

NB: developed on 2.4.3

TJ

-- 
_________________________________________________________________________

Terje Eggestad terje.eggestad@scali.no Scali Scalable Linux Systems http://www.scali.com

Olaf Helsets Vei 6 tel: +47 22 62 89 61 (OFFICE) P.O.Box 70 Bogerud +47 975 31 574 (MOBILE) N-0621 Oslo fax: +47 22 62 89 51 NORWAY _________________________________________________________________________


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



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:21 EST