Re: [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2015-02-02 Thread Petr Cermak
On Mon, Jan 26, 2015 at 04:00:20PM -0800, David Rientjes wrote: > [...] > This is a result of allowing something external (process B) be able to > clear hwm so that you never knew the value went to 100MB. That's the > definition of a race, I don't know how to explain it any better and making > any

Re: [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2015-01-15 Thread Petr Cermak
On Thu, Jan 15, 2015 at 01:36:30AM +0200, Kirill A. Shutemov wrote: > On Wed, Jan 14, 2015 at 03:22:25PM +0000, Petr Cermak wrote: > > On Wed, Jan 07, 2015 at 07:24:52PM +0200, Kirill A. Shutemov wrote: > > > And how it's not an ABI break? > > I don't think this i

Re: [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2015-01-14 Thread Petr Cermak
On Wed, Jan 07, 2015 at 07:24:52PM +0200, Kirill A. Shutemov wrote: > And how it's not an ABI break? I don't think this is an ABI break because the current behaviour is not changed unless you write "5" to /proc/pid/clear_refs. If you do, you are explicitly requesting the new functionality. > We ha

[PATCH v2 1/2] task_mmu: Reduce excessive indentation in clear_refs_write

2015-01-07 Thread Petr Cermak
This is a purely cosmetic fix for clear_refs_write(). It removes excessive indentation as suggested by Bjorn Helgaas . This is to make upcoming changes to the file more readable. Signed-off-by: Petr Cermak --- fs/proc/task_mmu.c | 102 - 1

[PATCH v2 0/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2015-01-07 Thread Petr Cermak
eld in /proc/pid/status, per benchmark iteration or test scenario. Changelog: v2: - clarify behaviour in documentation as suggesed by Andrew Morton - 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 excess

[PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2015-01-07 Thread Petr Cermak
Peak resident size of a process can be reset by writing "5" to /proc/pid/clear_refs. 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. Signed-off-by: P

[PATCH 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)

2014-12-15 Thread Petr Cermak
Cc: Andrew Morton Cc: Bjorn Helgaas Cc: Primiano Tucci Cc: Petr Cermak Signed-off-by: Petr Cermak --- Documentation/filesystems/proc.txt | 3 +++ fs/proc/task_mmu.c | 15 ++- include/linux/mm.h | 5 + 3 files changed, 22 insertions(+), 1 deletio

[PATCH 1/2] task_mmu: Reduce excessive indentation in clear_refs_write

2014-12-15 Thread Petr Cermak
This is a purely cosmetic fix for clear_refs_write(). It removes excessive indentation as suggested by Bjorn Helgaas . This is to make upcoming changes to the file more readable. Cc: linux...@kvack.org Cc: Andrew Morton Cc: Bjorn Helgaas Cc: Primiano Tucci Cc: Petr Cermak Signed-off-by: Petr

[RFC PATCH] Add user-space support for resetting mm->hiwater_rss (peak RSS)

2014-12-10 Thread Petr Cermak
eld in /proc/pid/status, per benchmark iteration or test scenario. Signed-off-by: Petr Cermak --- Documentation/filesystems/proc.txt | 3 ++ fs/proc/task_mmu.c | 106 + include/linux/mm.h | 5 ++ 3 files changed, 68 inserti