[5/2] fix nommu VSZ reporting in consolidated task_mem()

From: William Lee Irwin III
Date: Thu Sep 09 2004 - 14:24:03 EST


On Thu, 09 Sep 2004 12:02:14 -0700, William Lee Irwin III wrote:
>> + stats->vmrss += mm->end_code - mm->start_code;

On Thu, Sep 09, 2004 at 09:07:57PM +0200, Roger Luethi wrote:
> s/vmrss/vmsize/ ?

This follows fs/proc/task_nommu.c:task_statm, which ->vmsize would not.
vmsize would be the sum of kobjsize(tblk->rblock->kblock) for each
tblock, which actually does need fixing in the above.


-- wli

Index: mm4-2.6.9-rc1/kernel/nproc.c
===================================================================
--- mm4-2.6.9-rc1.orig/kernel/nproc.c 2004-09-09 12:00:44.649267323 -0700
+++ mm4-2.6.9-rc1/kernel/nproc.c 2004-09-09 12:18:01.876793680 -0700
@@ -77,7 +77,7 @@
if (tblk->next)
stats->vmrss += kobjsize(tblk->next);
if (tblk->rblock) {
- stats->vmsize += kobjsize(tblk->rblock);
+ stats->vmsize += kobjsize(tblk->rblock->kblock);
stats->vmrss += kobjsize(tblk->rblock);
stats->vmrss += kobjsize(tblk->rblock->kblock);
} else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/