Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316459 Details for
Bug 461956
Terrible clustat / clusvcadm performance.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix
rgmanager-rhel4-clustat-perf.patch (text/plain), 2.13 KB, created by
Lon Hohberger
on 2008-09-11 16:50:44 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2008-09-11 16:50:44 UTC
Size:
2.13 KB
patch
obsolete
>diff --git a/rgmanager/src/daemons/rg_event.c b/rgmanager/src/daemons/rg_event.c >index 48d0fca..335d6d2 100644 >--- a/rgmanager/src/daemons/rg_event.c >+++ b/rgmanager/src/daemons/rg_event.c >@@ -27,6 +27,7 @@ > #include <magma.h> > #include <magmamsg.h> > #include <vf.h> >+#include <time.h> > > > /** >@@ -40,6 +41,7 @@ static pthread_mutex_t mi_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; > static pthread_mutex_t event_queue_mutex = PTHREAD_MUTEX_INITIALIZER; > static pthread_mutex_t mi_mutex = PTHREAD_MUTEX_INITIALIZER; > #endif >+static pthread_cond_t event_queue_cond = PTHREAD_COND_INITIALIZER; > static pthread_t event_thread = 0; > static int transition_throttling = 5; > static int central_events = 0; >@@ -321,23 +323,35 @@ void * > _event_thread_f(void *arg) > { > event_t *ev; >+ struct timeval now; >+ struct timespec expire; > int count = 0; > >+ /* Event thread usually doesn't hang around. When it's >+ spawned, sleep for this many seconds in order to let >+ some events queue up */ >+ if (transition_throttling && !central_events) { >+ sleep(transition_throttling); >+ } >+ > while (1) { > pthread_mutex_lock(&event_queue_mutex); > ev = event_queue; >- if (ev) >- list_remove(&event_queue, ev); >- else >+ if (!ev && !central_events) { >+ gettimeofday(&now, NULL); >+ expire.tv_sec = now.tv_sec + 5; >+ expire.tv_nsec = now.tv_usec * 1000; >+ pthread_cond_timedwait(&event_queue_cond, >+ &event_queue_mutex, >+ &expire); >+ ev = event_queue; >+ } >+ if (!ev) > break; /* We're outta here */ > >- ++count; >- /* Event thread usually doesn't hang around. When it's >- spawned, sleep for this many seconds in order to let >- some events queue up */ >- if ((count==1) && transition_throttling && !central_events) >- sleep(transition_throttling); >+ list_remove(&event_queue, ev); > >+ ++count; > pthread_mutex_unlock(&event_queue_mutex); > > if (ev->ev_type == EVENT_CONFIG) { >@@ -417,6 +431,8 @@ insert_event(event_t *ev) > > pthread_create(&event_thread, &attrs, _event_thread_f, NULL); > pthread_attr_destroy(&attrs); >+ } else { >+ pthread_cond_broadcast(&event_queue_cond); > } > pthread_mutex_unlock (&event_queue_mutex); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 461956
: 316459