Thread (35 messages) 35 messages, 6 authors, 2019-08-19

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2019-08-07 20:58:46
Also in: linux-api, linux-fsdevel, linux-mm, lkml

On Wed, 7 Aug 2019 16:45:30 -0400 Joel Fernandes [off-list ref] wrote:
On Wed, Aug 07, 2019 at 01:04:02PM -0700, Andrew Morton wrote:
quoted
On Wed,  7 Aug 2019 13:15:54 -0400 "Joel Fernandes (Google)" [off-list ref] wrote:
quoted
In Android, we are using this for the heap profiler (heapprofd) which
profiles and pin points code paths which allocates and leaves memory
idle for long periods of time. This method solves the security issue
with userspace learning the PFN, and while at it is also shown to yield
better results than the pagemap lookup, the theory being that the window
where the address space can change is reduced by eliminating the
intermediate pagemap look up stage. In virtual address indexing, the
process's mmap_sem is held for the duration of the access.
So is heapprofd a developer-only thing?  Is heapprofd included in
end-user android loads?  If not then, again, wouldn't it be better to
make the feature Kconfigurable so that Android developers can enable it
during development then disable it for production kernels?
Almost all of this code is already configurable with
CONFIG_IDLE_PAGE_TRACKING. If you disable it, then all of this code gets
disabled.

Or are you referring to something else that needs to be made configurable?
Yes - the 300+ lines of code which this patchset adds!

The impacted people will be those who use the existing
idle-page-tracking feature but who will not use the new feature.  I
guess we can assume this set is small...

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help