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

From: David Rientjes
Date: Thu Jan 22 2015 - 18:27:38 EST


On Thu, 22 Jan 2015, Primiano Tucci wrote:

> > I think the bigger concern would be that this, and any new line such as
> > resettable_hiwater_rss, invalidates itself entirely. Any process that
> > checks the hwm will not know of other processes that reset it, so the
> > value itself has no significance anymore.
> > It would just be the mark since the last clear at an unknown time.
>
> How is that different from the current logic of clear_refs and the
> corresponding PG_Referenced bit?
>

If you reset the hwm for a process, rss grows to 100MB, another process
resets the hwm, and you see a hwm of 2MB, that invalidates the hwm
entirely. That's especially true if there's an oom condition that kills a
process when the rss grew to 100MB but you see a hwm of 2MB and don't
believe it was possibly the culprit. The hwm is already defined as the
highest rss the process has attained, resetting it and trying to make any
inference from the result is racy and invalidates the actual value which
is useful.
--
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/