Staging: android: lowmemorykiller: Only iterate over process list when needed.
authorArve Hjønnevåg <arve@android.com>
Mon, 11 May 2009 22:45:09 +0000 (15:45 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:52 +0000 (11:00 -0700)
commitf501d00144328ca9e0521d159cf80ff5c9d21d77
tree531d66da2ae1a953522a3ccb5b94e36a9243f0c3
parent4900dea69fc70d145c7d6b66830de6642a4c4152
Staging: android: lowmemorykiller: Only iterate over process list when needed.

Use NR_ACTIVE plus NR_INACTIVE as a size estimate for our fake cache
instead the sum of rss. Neither method is accurate.

Also skip the process scan, if the amount of memory available is above
the largest threshold set.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Cc: San Mehat <san@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/android/lowmemorykiller.c