]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf2915681daffb1e230d6932481d3fcc38496a5a2
tree531d66da2ae1a953522a3ccb5b94e36a9243f0c3
parent7cd6e3bf732ca951ece9a6b4f9c7dc1a69d82b9e
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