libpagemap: procmem: Reset working set everytime if page_idle is used.

Idle page tracking works a bit differently than that of clear_refs. A
write of 1 to page_idle/bitmap tell the kernel to determine if the page is
"idle" and is not accessed *anytime* in the past.

This way, we end up catching any new allocations that may have been done
since the last time working set was reset too.

Bug: 111694435
Test: procmem -h -W 1 && procmem -h -w 1
Test: procmem -h -i -W 1
Test: procmem -h -i -w 1
Test: procmem -h -i -w <pid>; alloc memory in <pid>; procmem -h -i -w <pid>
      Observe that newly allocated and set memory is no accounted in the
      working set.

Change-Id: Icfabd4e27c006b84e01502fff666d76ebb74c409
Signed-off-by: Sandeep Patil <sspatil@google.com>
1 file changed