Skip send a reply for set and clear boosting 64/277064/1
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 30 Jun 2022 05:18:37 +0000 (14:18 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 30 Jun 2022 05:56:02 +0000 (14:56 +0900)
Change-Id: I771b1580acd309294e18e6f47eb613dd5d0e8eeb
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/common/util.c
src/resource-optimizer/cpu/cpu-boosting.c

index d99d6d3..ad558f3 100644 (file)
@@ -105,7 +105,7 @@ int sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags)
        }
 #endif
        if (error) {
-               _E("[CPU-SCHED] Failed to set policy and priority");
+               _E("[CPU-SCHED] Failed to set policy and priority with error = %s", strerror(errno));
                return RESOURCED_ERROR_FAIL;
        }
 
index c70b16d..3f94c15 100644 (file)
@@ -215,7 +215,7 @@ static int cpu_boosting_enqueue_by_socket(int sock)
        int ret = RESOURCED_ERROR_NONE;
        int byte;
        struct cpu_boosting_input *input;
-       cpu_boosting_output_t output;
+//     cpu_boosting_output_t output;
 
        input = cpu_boosting_new_request();
        if (input == NULL) {
@@ -267,15 +267,16 @@ static int cpu_boosting_enqueue_by_socket(int sock)
                }
        }
 
-       if (input->client_input.command == CPU_BOOSTING_COMMAND_SET ||
+/*     if (input->client_input.command == CPU_BOOSTING_COMMAND_SET ||
                input->client_input.command == CPU_BOOSTING_COMMAND_CLEAR) {
                output.success = true;
                output.level.tid_level = NULL;
                output.level.tid_count = 0;
                cpu_boosting_send_reply(sock, &output);
-       }
+       }*/
 
-       input->sock = sock;     /* For a reply */
+       if (input->client_input.command == CPU_BOOSTING_COMMAND_GET)
+               input->sock = sock;     /* For a reply */
        CPU_BOOSTING_ENQUEUE_REQUEST(input);
        return RESOURCED_ERROR_NONE;
 
@@ -463,6 +464,8 @@ output_update:
 static void cpu_boosting_get(struct cpu_boosting_input *input,
                cpu_boosting_output_t *output)
 {
+
+       cpu_boosting_send_reply(input->sock, output);
 }
 
 /* Cpu boosting thread's main code */