Being able to reset mm->hiwater_rss (resident set size high water mark) from user space would enable fine grained iterative memory profiling. I propose a very short patch for doing so. The driving use-case for this would be getting the peak RSS value, which can be retrieved from the VmHWM field in /proc/pid/status, per benchmark iteration or test scenario. Changelog: v2: - clarify behaviour in documentation as suggesed by Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> - fix a declaration-after-statement warning in fs/proc/task_mmu.c v1: https://lkml.org/lkml/2014/12/10/312 Petr Cermak (2): task_mmu: Reduce excessive indentation in clear_refs_write task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS) Documentation/filesystems/proc.txt | 3 + fs/proc/task_mmu.c | 115 +++++++++++++++++++++---------------- include/linux/mm.h | 5 ++ 3 files changed, 74 insertions(+), 49 deletions(-) -- 2.2.0.rc0.207.ga3a616c -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>