lowmemorykiller: make default lowmemorykiller debug message useful
authorColin Cross <ccross@android.com>
Fri, 3 May 2013 21:57:29 +0000 (14:57 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:41:35 +0000 (13:41 -0800)
commit758a1cb1f644837d2099f3900172e8814dcef3ab
tree4bd0044536f7334fcbdc3db78312af199d4067f4
parent59719f7ffbb7f1663b0f5270c7711d2fe211d244
lowmemorykiller: make default lowmemorykiller debug message useful

lowmemorykiller debug messages are inscrutable and mostly useful
for debugging the lowmemorykiller, not explaining why a process
was killed.  Make the messages more useful by prefixing them
with "lowmemorykiller: " and explaining in more readable terms
what was killed, who it was killed for, and why it was killed.

The messages now look like:
[   76.997631] lowmemorykiller: Killing 'droid.gallery3d' (2172), adj 1000,
[   76.997635]    to free 27436kB on behalf of 'kswapd0' (29) because
[   76.997638]    cache 122624kB is below limit 122880kB for oom_score_adj 1000
[   76.997641]    Free memory is -53356kB above reserved

A negative number for free memory above reserved means some of the
reserved memory has been used and is being regenerated by kswapd,
which is likely what called the shrinkers.

Change-Id: I1fe983381e73e124b90aa5d91cb66e55eaca390f
Signed-off-by: Colin Cross <ccross@android.com>
drivers/staging/android/lowmemorykiller.c