[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 2/6] mm/page_idle: Add support for handling swapped PG_Idle pages
On Wed 07-08-19 13:15:55, Joel Fernandes (Google) wrote:
> Idle page tracking currently does not work well in the following
> scenario:
> 1. mark page-A idle which was present at that time.
> 2. run workload
> 3. page-A is not touched by workload
> 4. *sudden* memory pressure happen so finally page A is finally swapped out
> 5. now see the page A - it appears as if it was accessed (pte unmapped
> so idle bit not set in output) - but it's incorrect.
> To fix this, we store the idle information into a new idle bit of the
> swap PTE during swapping of anonymous pages.
> Also in the future, madvise extensions will allow a system process
> manager (like Android's ActivityManager) to swap pages out of a process
> that it knows will be cold. To an external process like a heap profiler
> that is doing idle tracking on another process, this procedure will
> interfere with the idle page tracking similar to the above steps.

This could be solved by checking the !present/swapped out pages
right? Whoever decided to put the page out to the swap just made it
idle effectively. So the monitor can make some educated guess for
tracking. If that is fundamentally not possible then please describe
Michal Hocko

 \ /
  Last update: 2019-08-13 17:06    [W:0.120 / U:2.168 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site