]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
pull this code echo -1 > /proc/sys/kernel/sched_rt_runtime_us yourself if you want...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Oct 2012 13:29:26 +0000 (08:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Oct 2012 13:29:26 +0000 (08:29 -0500)
src/switch_core.c

index 4e47519757b9a6fb44b1a0a45f2ce13ed79e4221..95a7b4dbed154853c5e37c2f2665c2fb43ca671d 100644 (file)
@@ -731,9 +731,6 @@ SWITCH_DECLARE(int32_t) set_realtime_priority(void)
         * Try to use a round-robin scheduler
         * with a fallback if that does not work
         */
-       int fd;
-       const char *rt = "/proc/sys/kernel/sched_rt_runtime_us";
-       char data[] = "-1\n";
        struct sched_param sched = { 0 };
        sched.sched_priority = SWITCH_PRI_LOW;
        if (sched_setscheduler(0, SCHED_FIFO, &sched)) {
@@ -742,21 +739,6 @@ SWITCH_DECLARE(int32_t) set_realtime_priority(void)
                        return -1;
                }
        }
-
-       if ((fd = open(rt, O_WRONLY)) > 0) {
-               int r;
-               
-               if (!(r = write(fd, data, sizeof(data)))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Disablling RT limits [%s][%d]\n", rt, r);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Disabling RT throttling.\n");
-               }
-               close(fd);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error opening %s\n", rt);
-       }
-
-       
 #endif