task_vsize() mysteriously appeared on my profiles. This should remove
it from them by using the already in-use elsewhere for rlimit checks
mm->total_vm for the benefit of O(1) cachelines touched.
--- virgin-2.5.67/fs/proc/task_mmu.c Wed Jan 15 08:46:04 2003
+++ wli-2.5.67-1/fs/proc/task_mmu.c Tue Apr 8 06:57:27 2003
@@ -45,13 +45,7 @@
unsigned long task_vsize(struct mm_struct *mm)
{
- struct vm_area_struct *vma;
- unsigned long vsize = 0;
-
- for (vma = mm->mmap; vma; vma = vma->vm_next)
- vsize += vma->vm_end - vma->vm_start;
-
- return vsize;
+ return PAGE_SIZE * mm->total_vm;
}
int task_statm(struct mm_struct *mm, int *shared, int *text,
-
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/