Re: [PATCH 2.6.14-rc2] fix incorrect mm->hiwater_vm and mm->hiwater_rss

From: Jay Lan
Date: Wed Sep 21 2005 - 12:39:57 EST


Christoph Lameter wrote:
On Wed, 21 Sep 2005, Jay Lan wrote:


5. Please add appropriate CONFIG, dummy macros etc., so that no time
is wasted on these updates in all the vanilla systems which have no
interest in them - but maybe Christoph already has that well in hand.

It is used in enhanced system accounting. An obvious CONFIG would be
CONFIG_BSD_PROCESS_ACCT.


Right. Make all the data fields and code dependent on an appropriate CONFIG_XXX macro. We talked about that a couple of weeks ago as AFAIK.

I had a look at Frank's patch and it does not seem to touch the critical paths. Jay: Can you verify that the changes do not affect critical paths and that accounting is still working in the right way?

Frank's patch looks fine to me except one place:
diff -ru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c 2005-09-21 11:07:40.000000000 +0200
+++ b/mm/mmap.c 2005-09-21 11:17:06.755572000 +0200
@@ -854,6 +854,7 @@
mm->stack_vm += pages;
if (flags & (VM_RESERVED|VM_IO))
mm->reserved_vm += pages;
+ update_mem_hiwater(mm);
}
#endif /* CONFIG_PROC_FS */

I have a question of adding this call here. 'update_mem_hiwater'
does nothing unless mm->total_vm or rss gets updated.
I do not see total_vm get updates in __vm_stat_account()?

- jay

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