android/lowmemorykiller: Only consider gfp_mask free pages

In certain memory configurations there can be a large number of
pages which are not suitable to satisfy certain memory requests
(such as when CMA is enabled).
This large number of unsuitable pages can cause the
lowmemorykiller to not kill any tasks because the
lowmemorykiller counts all free pages.

In order to ensure the lowmemorykiller properly evaluates the
free memory only count the free pages which are suitable for
satisfying the memory request.

Change-Id: Iaf8c06bb6f34d61e02d2f80f9d7e90e762ee75e8
Signed-off-by: Liam Mark <lmark@codeaurora.org>
3 files changed