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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 21, 2015 at 10:58 PM, David Rientjes <rientjes@xxxxxxxxxx> 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?

> Userspace can monitor the rss of a
> process by reading /proc/pid/stat, there's no need for the kernel to do
> something that userspace can do.

I disagree here. The driving motivation of this patch is precisely the
opposite. There are peak events that last for very short time (order:
10-100 ms) and are practically invisible from user-space (even doing
something awkward like polling in a tight loop). Concrete examples
are: GPU memory transfers, image decoding, compression /
decompression.
These kinds of tasks, which use scratch buffers for few ms, can create
significant (yet short lasting) memory pressure which is desirable to
monitor.

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]