memset(&attr, 0, sizeof(struct sched_attr));
attr.size = sizeof(struct sched_attr);
if (pci->cpu_sched_info.cpu_nice >= CPU_MIN_NICE &&
- pci->cpu_sched_info.cpu_nice <= CPU_MAX_NICE) {
+ pci->cpu_sched_info.cpu_nice <= CPU_MAX_NICE) {
attr.sched_nice = pci->cpu_sched_info.cpu_nice;
pai->app_cpu_nice_update_exclude = true;
}
switch (pci->cpu_sched_info.cpu_sched_type) {
case CPU_SCHED_NONE:
+ if (attr.sched_nice == CPU_INIT_NICE)
+ goto skip_scheduler_update;
+
+ /* else go through */
case CPU_SCHED_OTHER:
attr.sched_policy = SCHED_OTHER;
/* error = sched_getattr(pid, &attr, 0);
_I("[PROCESS] nice = %d", attr.sched_nice);
_I("[PROCESS] priority = %d", attr.sched_priority);
+skip_scheduler_update:
if (pci->watchdog_action == PROC_ACTION_IGNORE)
pai->app_watchdog_exclude = true;
pci->pid = pid;
+ /* Put a system service into (cpu) throttling group */
+ if (pci->cpu_throttling_enable) {
+ struct proc_status ps = {0, };
+ ps.pid = pid;
+ ps.pai = NULL;
+ resourced_notify(RESOURCED_NOTIFIER_THROTTLING_RESOURCE, &ps);
+ }
+
memset(&attr, 0, sizeof(struct sched_attr));
attr.size = sizeof(struct sched_attr);
if (pci->cpu_sched_info.cpu_nice >= CPU_MIN_NICE &&
_W("[WATCHDOG] Currently we support only REBOOT when a service is released");
}
- /* Put a system service into (cpu) throttling group */
- if (pci->cpu_throttling_enable) {
- struct proc_status ps = {0, };
- ps.pid = pid;
- ps.pai = NULL;
- resourced_notify(RESOURCED_NOTIFIER_THROTTLING_RESOURCE, &ps);
- }
/* if (pci->cpu_sched_info.cpu_sched_type == CPU_SCHED_FIFO ||
pci->cpu_sched_info.cpu_sched_type == CPU_SCHED_RR ||
pci->cpu_sched_info.cpu_sched_type == CPU_SCHED_DEADLINE) {