diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-17 02:33:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-17 02:33:45 +0000 |
commit | 91b07b8c367faef73225074102fe13616789440a (patch) | |
tree | 2d7cc2f576a54b1d3733a920a543fb164d635d22 /src/inspircd.cpp | |
parent | 55bc98f87d824e2803141aef1632fffc6eef4496 (diff) |
Epoll tweaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1409 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 52f7b6479..ec47b9e16 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -36,7 +36,7 @@ using namespace std; #ifdef USE_EPOLL #include <sys/epoll.h> -#define EP_DELAY 10 +#define EP_DELAY 100 #endif #include <time.h> @@ -2795,7 +2795,10 @@ int InspIRCd(char** argv, int argc) user_hash::iterator count2 = clientlist.begin(); #ifdef USE_EPOLL - i = epoll_wait(sep, event, 1, EP_DELAY); + i = epoll_wait(sep, event, 1, EP_DELAY*2); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif if (i > 0) { log(DEBUG,"epoll: Listening server socket event, i=%d, event.data.fd=%d",i,event[0].data.fd); @@ -3049,7 +3052,7 @@ int InspIRCd(char** argv, int argc) v = 0; #ifdef USE_EPOLL - int i = epoll_wait(ep, event, 1, EP_DELAY); + int i = epoll_wait(ep, event, 1, 5); if (i > 0) { log(DEBUG,"epoll_wait call: ep=%d, i=%d",ep,i); @@ -3296,7 +3299,13 @@ int InspIRCd(char** argv, int argc) { #endif #ifdef USE_EPOLL - i = epoll_wait(lep, event, 32, EP_DELAY); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif + i = epoll_wait(lep, event, 32, EP_DELAY*2); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif if (i > 0) for (j = 0; j < i; j++) { log(DEBUG,"epoll: Listening socket event, i=%d,events[j].data.fd=%d",i,event[j].data.fd); |