OSDN Git Service

libpagemap: pm_map: skip pages that are neither present nor swapped.
authorSandeep Patil <sspatil@google.com>
Tue, 9 Oct 2018 20:58:01 +0000 (13:58 -0700)
committerSandeep Patil <sspatil@google.com>
Tue, 23 Oct 2018 22:37:36 +0000 (15:37 -0700)
commitf0384e77821d48cbca2d57426f21ba054b77757b
treed8369840b4d0371488e760261161db65b5c5a219
parent99d37b48bbfee9955a8b2f71ea59fe42cc1e2e49
libpagemap: pm_map: skip pages that are neither present nor swapped.

The pm_map_workingset() code needlessly iterates through all the pages
in the map regardless of whether they are actually present or not. Fix
that by skipping the page if its not swapped AND not present.

Bug: 111694435
Test: procmem -h -w 1

Change-Id: I8f16e8c516a5272ebeaa537c07b08ae9f41b73ca
Signed-off-by: Sandeep Patil <sspatil@google.com>
libpagemap/pm_map.c