From e66f1253c51f0ec42c33224f8ca5cde0e295aeb3 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Thu, 6 Feb 2020 21:03:24 -0800 Subject: [PATCH] simple_lmk: Print a message when there are no processes to kill Makes it clear that Simple LMK tried its best but there was nothing it could do. Signed-off-by: Sultan Alsawaf --- drivers/android/simple_lmk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/android/simple_lmk.c b/drivers/android/simple_lmk.c index 3816f8bf3946..76f40e99b80d 100644 --- a/drivers/android/simple_lmk.c +++ b/drivers/android/simple_lmk.c @@ -165,8 +165,10 @@ static void scan_and_kill(unsigned long pages_needed) read_unlock(&tasklist_lock); /* Pretty unlikely but it can happen */ - if (unlikely(!nr_victims)) + if (unlikely(!nr_victims)) { + pr_err("No processes available to kill!\n"); return; + } /* First round of victim processing to weed out unneeded victims */ nr_to_kill = process_victims(nr_victims, pages_needed);