summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangYoun Kwak <sy.kwak@samsung.com>2024-08-08 15:48:36 +0900
committerSangYoun Kwak <sy.kwak@samsung.com>2024-08-08 15:49:21 +0900
commitcc6be78b4ac4367a37e6aa8a2899e21e620c3fb5 (patch)
treec207795633cd17a62225e034dac6e0ee527a2dfa
parent66e3119ef4d7e673fe493eba218c41c542c7b730 (diff)
downloadresourced-cc6be78b4ac4367a37e6aa8a2899e21e620c3fb5.tar.gz
resourced-cc6be78b4ac4367a37e6aa8a2899e21e620c3fb5.tar.bz2
resourced-cc6be78b4ac4367a37e6aa8a2899e21e620c3fb5.zip
Change-Id: Ia9c101dbf2dcce5c37575ba33e6e92cae66e4069 Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
-rw-r--r--src/resourced/init.c88
1 files changed, 25 insertions, 63 deletions
diff --git a/src/resourced/init.c b/src/resourced/init.c
index 463c7dfa..c3b3086d 100644
--- a/src/resourced/init.c
+++ b/src/resourced/init.c
@@ -297,69 +297,31 @@ int fixed_list_init(enum proc_type proc_type)
attr.sched_priority = CPU_INIT_PRIO;
switch (pci->cpu_sched_info.cpu_sched_type) {
- case CPU_SCHED_NONE:
- if (attr.sched_nice == CPU_INIT_NICE)
- goto skip_scheduler_update;
- attr.sched_policy = SCHED_OTHER;
- break;
- case CPU_SCHED_OTHER:
- attr.sched_policy = SCHED_OTHER;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");
-
- if (attr.sched_policy != SCHED_OTHER)
- _E("[CPU-SCHED] current policy (%d) is different from %d",
- attr.sched_policy, SCHED_OTHER);*/
- break;
- case CPU_SCHED_IDLE:
- attr.sched_policy = SCHED_IDLE;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");
-
- if (attr.sched_policy != SCHED_IDLE)
- _E("[CPU-SCHED] current policy (%d) is different from %d",
- attr.sched_policy, SCHED_IDLE);*/
- break;
- case CPU_SCHED_BATCH:
- attr.sched_policy = SCHED_BATCH;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");
-
- if (attr.sched_policy != SCHED_BATCH)
- _E("[CPU-SCHED] current policy (%d) is different from %d",
- attr.sched_policy, SCHED_BATCH);*/
- break;
- case CPU_SCHED_FIFO:
- attr.sched_policy = SCHED_FIFO;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");
-
- if (attr.sched_policy != SCHED_FIFO)
- _E("[CPU-SCHED] current policy (%d) is different from %d",
- attr.sched_policy, SCHED_FIFO);*/
- break;
- case CPU_SCHED_RR:
- attr.sched_policy = SCHED_RR;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");
-
- if (attr.sched_policy != SCHED_RR)
- _E("[CPU-SCHED] current policy (%d) is different from %d",
- attr.sched_policy, SCHED_RR);*/
- break;
- case CPU_SCHED_DEADLINE:
- attr.sched_policy = SCHED_DEADLINE;
-/* error = sched_getattr(pid, &attr, 0);
- if (error)
- _E("[CPU-SCHED] Failed to get sched attributes");*/
- break;
- default:
- _E("[CPU-SCHED] Unknown CPU sched type");
+ case CPU_SCHED_NONE:
+ if (attr.sched_nice == CPU_INIT_NICE)
+ goto skip_scheduler_update;
+ attr.sched_policy = SCHED_OTHER;
+ break;
+ case CPU_SCHED_OTHER:
+ attr.sched_policy = SCHED_OTHER;
+ break;
+ case CPU_SCHED_IDLE:
+ attr.sched_policy = SCHED_IDLE;
+ break;
+ case CPU_SCHED_BATCH:
+ attr.sched_policy = SCHED_BATCH;
+ break;
+ case CPU_SCHED_FIFO:
+ attr.sched_policy = SCHED_FIFO;
+ break;
+ case CPU_SCHED_RR:
+ attr.sched_policy = SCHED_RR;
+ break;
+ case CPU_SCHED_DEADLINE:
+ attr.sched_policy = SCHED_DEADLINE;
+ break;
+ default:
+ _E("[CPU-SCHED] Unknown CPU sched type");
}
error = sched_setattr_of_all_tasks(pid, &attr, 0);
if (error)