mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "sched: Improve the scheduler"
This commit is contained in:
commit
6f2e87c346
1 changed files with 6 additions and 6 deletions
|
|
@ -5631,9 +5631,10 @@ unsigned int sched_lib_mask_force;
|
|||
bool is_sched_lib_based_app(pid_t pid)
|
||||
{
|
||||
const char *name = NULL;
|
||||
char *lib_list, *libname;
|
||||
char *libname, *lib_list;
|
||||
struct vm_area_struct *vma;
|
||||
char path_buf[LIB_PATH_LENGTH];
|
||||
char tmp_lib_name[LIB_PATH_LENGTH];
|
||||
bool found = false;
|
||||
struct task_struct *p;
|
||||
struct mm_struct *mm;
|
||||
|
|
@ -5641,14 +5642,11 @@ bool is_sched_lib_based_app(pid_t pid)
|
|||
if (strnlen(sched_lib_name, LIB_PATH_LENGTH) == 0)
|
||||
return false;
|
||||
|
||||
lib_list = kstrdup(sched_lib_name, GFP_KERNEL);
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
p = find_process_by_pid(pid);
|
||||
if (!p) {
|
||||
rcu_read_unlock();
|
||||
kfree(lib_list);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -5668,11 +5666,14 @@ bool is_sched_lib_based_app(pid_t pid)
|
|||
if (IS_ERR(name))
|
||||
goto release_sem;
|
||||
|
||||
strlcpy(tmp_lib_name, sched_lib_name, LIB_PATH_LENGTH);
|
||||
lib_list = tmp_lib_name;
|
||||
while ((libname = strsep(&lib_list, ","))) {
|
||||
libname = skip_spaces(libname);
|
||||
if (strnstr(name, libname,
|
||||
strnlen(name, LIB_PATH_LENGTH))) {
|
||||
found = true;
|
||||
break;
|
||||
goto release_sem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5683,7 +5684,6 @@ release_sem:
|
|||
mmput(mm);
|
||||
put_task_struct:
|
||||
put_task_struct(p);
|
||||
kfree(lib_list);
|
||||
return found;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue