Signed-off-by: Angus Salkeld <[email protected]>
---
 exec/main.c |   55 +------------------------------------------------------
 1 files changed, 1 insertions(+), 54 deletions(-)

diff --git a/exec/main.c b/exec/main.c
index b03d33e..006f846 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -144,8 +144,6 @@ LOGSYS_DECLARE_SUBSYS ("MAIN");
 
 #define SERVER_BACKLOG 5
 
-static int sched_priority = 0;
-
 static unsigned int service_count = 32;
 
 static struct totem_logging_configuration totem_logging_configuration;
@@ -972,46 +970,6 @@ void message_source_set (
        source->conn = conn;
 }
 
-static void corosync_setscheduler (void)
-{
-#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && 
defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
-       int res;
-
-       sched_priority = sched_get_priority_max (SCHED_RR);
-       if (sched_priority != -1) {
-               global_sched_param.sched_priority = sched_priority;
-               res = sched_setscheduler (0, SCHED_RR, &global_sched_param);
-               if (res == -1) {
-                       LOGSYS_PERROR(errno, LOGSYS_LEVEL_WARNING,
-                               "Could not set SCHED_RR at priority %d",
-                               global_sched_param.sched_priority);
-
-                       global_sched_param.sched_priority = 0;
-                       logsys_thread_priority_set (SCHED_OTHER, NULL, 1);
-               } else {
-
-                       /*
-                        * Turn on SCHED_RR in logsys system
-                        */
-                       res = logsys_thread_priority_set (SCHED_RR, 
&global_sched_param, 10);
-                       if (res == -1) {
-                               log_printf (LOGSYS_LEVEL_ERROR,
-                                           "Could not set logsys thread 
priority."
-                                           " Can't continue because of 
priority inversions.");
-                               corosync_exit_error (AIS_DONE_LOGSETUP);
-                       }
-               }
-       } else {
-               LOGSYS_PERROR (errno, LOGSYS_LEVEL_WARNING,
-                       "Could not get maximum scheduler priority");
-               sched_priority = 0;
-       }
-#else
-       log_printf(LOGSYS_LEVEL_WARNING,
-               "The Platform is missing process priority setting features.  
Leaving at default.");
-#endif
-}
-
 static void fplay_key_change_notify_fn (
        object_change_type_t change_type,
        hdb_handle_t parent_object_handle,
@@ -1203,7 +1161,7 @@ int main (int argc, char **argv, char **envp)
        char *iface;
        char *strtok_save_pt;
        int res, ch;
-       int background, setprio;
+       int background;
        struct stat stat_out;
        char corosync_lib_dir[PATH_MAX];
        hdb_handle_t object_runtime_handle;
@@ -1212,7 +1170,6 @@ int main (int argc, char **argv, char **envp)
        /* default configuration
         */
        background = 1;
-       setprio = 1;
 
        while ((ch = getopt (argc, argv, "fpv")) != EOF) {
 
@@ -1222,7 +1179,6 @@ int main (int argc, char **argv, char **envp)
                                logsys_config_mode_set (NULL, 
LOGSYS_MODE_OUTPUT_STDERR|LOGSYS_MODE_THREADED|LOGSYS_MODE_FORK);
                                break;
                        case 'p':
-                               setprio = 0;
                                break;
                        case 'v':
                                printf ("Corosync Cluster Engine, version 
'%s'\n", VERSION);
@@ -1240,15 +1196,6 @@ int main (int argc, char **argv, char **envp)
                }
        }
 
-       /*
-        * Set round robin realtime scheduling with priority 99
-        * Lock all memory to avoid page faults which may interrupt
-        * application healthchecking
-        */
-       if (setprio) {
-               corosync_setscheduler ();
-       }
-
        corosync_mlockall ();
 
        log_printf (LOGSYS_LEVEL_NOTICE, "Corosync Cluster Engine ('%s'): 
started and ready to provide service.\n", VERSION);
-- 
1.7.6

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to