OSDN Git Service

simple_lmk: Mark reclaim kthread as performance critical
authorSultan Alsawaf <sultan@kerneltoast.com>
Sun, 12 May 2019 20:12:21 +0000 (13:12 -0700)
committer0ranko0P <ranko0p@outlook.com>
Sat, 7 Dec 2019 10:22:19 +0000 (18:22 +0800)
Simple LMK's reclaim thread needs to run as quickly as possible to
reduce memory allocation latency when memory pressure is high. Mark it
as performance critical to schedule it on faster CPUs.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
drivers/android/simple_lmk.c

index 1283072..e5af212 100644 (file)
@@ -315,7 +315,8 @@ static int simple_lmk_init_set(const char *val, const struct kernel_param *kp)
        if (atomic_cmpxchg(&init_done, 0, 1))
                return 0;
 
-       thread = kthread_run(simple_lmk_reclaim_thread, NULL, "simple_lmkd");
+       thread = kthread_run_perf_critical(simple_lmk_reclaim_thread, NULL,
+                                          "simple_lmkd");
        BUG_ON(IS_ERR(thread));
 
        return 0;