From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon gd_internal.h main.c
Date: 15 Sep 2006 18:20:38 -0000 [thread overview]
Message-ID: <20060915182038.19100.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-09-15 18:20:37
Modified files:
group/daemon : gd_internal.h main.c
Log message:
have groupd set the scheduler to RR priority 2, same as gfs_controld
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/gd_internal.h.diff?cvsroot=cluster&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/main.c.diff?cvsroot=cluster&r1=1.43&r2=1.44
--- cluster/group/daemon/gd_internal.h 2006/09/12 21:57:05 1.39
+++ cluster/group/daemon/gd_internal.h 2006/09/15 18:20:36 1.40
@@ -26,6 +26,7 @@
#include <dirent.h>
#include <syslog.h>
#include <time.h>
+#include <sched.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/types.h>
--- cluster/group/daemon/main.c 2006/09/14 20:49:38 1.43
+++ cluster/group/daemon/main.c 2006/09/15 18:20:36 1.44
@@ -870,6 +870,24 @@
}
}
+void set_scheduler(void)
+{
+ struct sched_param sched_param;
+ int rv;
+
+ rv = sched_get_priority_max(SCHED_RR);
+ if (rv != -1) {
+ sched_param.sched_priority = 2;
+ rv = sched_setscheduler(0, SCHED_RR, &sched_param);
+ if (rv == -1)
+ log_print("could not set SCHED_RR priority %d err %d",
+ sched_param.sched_priority, errno);
+ } else {
+ log_print("could not get maximum scheduler priority err %d",
+ errno);
+ }
+}
+
int main(int argc, char *argv[])
{
prog_name = argv[0];
@@ -885,6 +903,8 @@
if (!groupd_debug_opt)
daemonize();
+ set_scheduler();
+
pollfd = malloc(NALLOC * sizeof(struct pollfd));
if (!pollfd)
return -1;
reply other threads:[~2006-09-15 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060915182038.19100.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).