kernel: Boost to the max for when zygote forks
In order to boost during the period from when a new app is forked to the time that it is added to the top-app cpuset (which is a signal to subsequently boost again), boost for a short amount of time when zygote forks. Not all processes forked from zygote are top apps, hence the decoupled boosting setup. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: celtare21 <celtare21@gmail.com> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
committed by
UtsavBalar1231
parent
2ff1ac40e7
commit
ab25cbf8fb
@@ -95,6 +95,7 @@
|
||||
#include <linux/cpufreq_times.h>
|
||||
#include <linux/scs.h>
|
||||
#include <linux/simple_lmk.h>
|
||||
#include <linux/cpu_input_boost.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -2206,6 +2207,10 @@ long _do_fork(unsigned long clone_flags,
|
||||
int trace = 0;
|
||||
long nr;
|
||||
|
||||
/* Boost CPU to the max for 3000 ms when userspace launches an app */
|
||||
if (task_is_zygote(current))
|
||||
cpu_input_boost_kick_max(3000);
|
||||
|
||||
/*
|
||||
* Determine whether and which event to report to ptracer. When
|
||||
* called from kernel_thread or CLONE_UNTRACED is explicitly
|
||||
|
||||
Reference in New Issue
Block a user