diff options
author | Mathieu BĂ©rard <mathieu.berard@crans.org> | 2008-08-11 13:52:38 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-08-11 13:52:38 -0400 |
commit | 9f9268821b13038556fbc029df54ab0e9b2aa77f (patch) | |
tree | e9ca5dd417acfa3a2d9171f6f5e972903dcab88a | |
parent | 2e2ce817ce404a5e000c9750fa96f656fed370b8 (diff) |
The smart scheduler is not optional.
-rw-r--r-- | configure.ac | 1 | ||||
-rwxr-xr-x | damageext/damageext.c | 2 | ||||
-rw-r--r-- | dix/dispatch.c | 16 | ||||
-rw-r--r-- | dix/events.c | 2 | ||||
-rw-r--r-- | include/dix-config.h.in | 3 | ||||
-rw-r--r-- | include/dixstruct.h | 4 | ||||
-rw-r--r-- | include/xorg-server.h.in | 3 | ||||
-rw-r--r-- | os/WaitFor.c | 14 | ||||
-rw-r--r-- | os/io.c | 6 | ||||
-rw-r--r-- | os/osinit.c | 4 | ||||
-rw-r--r-- | os/utils.c | 8 |
11 files changed, 0 insertions, 63 deletions
diff --git a/configure.ac b/configure.ac index 0769cb3c1..5155dbd1a 100644 --- a/configure.ac +++ b/configure.ac @@ -1041,7 +1041,6 @@ AC_SUBST([VENDOR_NAME_SHORT]) AC_SUBST([VENDOR_RELEASE]) AC_SUBST([VENDOR_MAN_VERSION]) -AC_DEFINE(SMART_SCHEDULE, 1, [Include time-based scheduler]) AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) if test "x$DEBUGGING" = xyes; then diff --git a/damageext/damageext.c b/damageext/damageext.c index 517c72dac..7dd328aba 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -90,9 +90,7 @@ DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) if (pDamageClient->critical > 0) { SetCriticalOutputPending (); -#ifdef SMART_SCHEDULE pClient->smart_priority = SMART_MAX_PRIORITY; -#endif } } diff --git a/dix/dispatch.c b/dix/dispatch.c index c04443be0..202d2d99d 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -237,7 +237,6 @@ UpdateCurrentTimeIf(void) currentTime = systime; } -#ifdef SMART_SCHEDULE #undef SMART_DEBUG @@ -338,7 +337,6 @@ SmartScheduleClient (int *clientReady, int nready) } return best; } -#endif #define MAJOROP ((xReq *)client->requestBuffer)->reqType @@ -350,9 +348,7 @@ Dispatch(void) ClientPtr client; int nready; HWEventQueuePtr* icheck = checkForInput; -#ifdef SMART_SCHEDULE long start_tick; -#endif nextFreeClientID = 1; nClients = 0; @@ -371,13 +367,11 @@ Dispatch(void) nready = WaitForSomething(clientReady); -#ifdef SMART_SCHEDULE if (nready && !SmartScheduleDisable) { clientReady[0] = SmartScheduleClient (clientReady, nready); nready = 1; } -#endif /***************** * Handle events in round robin fashion, doing input between * each round @@ -399,16 +393,13 @@ Dispatch(void) } isItTimeToYield = FALSE; -#ifdef SMART_SCHEDULE start_tick = SmartScheduleTime; -#endif while (!isItTimeToYield) { if (*icheck[0] != *icheck[1]) ProcessInputEvents(); FlushIfCriticalOutputPending(); -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable && (SmartScheduleTime - start_tick) >= SmartScheduleSlice) { @@ -417,7 +408,6 @@ Dispatch(void) client->smart_priority--; break; } -#endif /* now, finally, deal with client requests */ result = ReadRequestFromClient(client); @@ -465,11 +455,9 @@ Dispatch(void) } } FlushAllOutput(); -#ifdef SMART_SCHEDULE client = clients[clientReady[nready]]; if (client) client->smart_stop_tick = SmartScheduleTime; -#endif } dispatchException &= ~DE_PRIORITYCHANGE; } @@ -3453,9 +3441,7 @@ CloseDownClient(ClientPtr client) if (client->index < nextFreeClientID) nextFreeClientID = client->index; clients[client->index] = NullClient; -#ifdef SMART_SCHEDULE SmartLastClient = NullClient; -#endif dixFreePrivates(client->devPrivates); xfree(client); @@ -3505,12 +3491,10 @@ void InitClient(ClientPtr client, int i, pointer ospriv) #endif client->replyBytesRemaining = 0; client->fontResFunc = NULL; -#ifdef SMART_SCHEDULE client->smart_priority = 0; client->smart_start_tick = SmartScheduleTime; client->smart_stop_tick = SmartScheduleTime; client->smart_check_tick = SmartScheduleTime; -#endif client->clientPtr = NULL; } diff --git a/dix/events.c b/dix/events.c index f04433b65..7a79d292b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2014,10 +2014,8 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, if (BitIsOn(criticalEvents, type)) { -#ifdef SMART_SCHEDULE if (client->smart_priority < SMART_MAX_PRIORITY) client->smart_priority++; -#endif SetCriticalOutputPending(); } diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 6400b695e..21d8d9c10 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -252,9 +252,6 @@ /* Support SHAPE extension */ #undef SHAPE -/* Include time-based scheduler */ -#undef SMART_SCHEDULE - /* Define to 1 on systems derived from System V Release 4 */ #undef SVR4 diff --git a/include/dixstruct.h b/include/dixstruct.h index 306870c9b..aae2dbd77 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -129,17 +129,14 @@ typedef struct _Client { struct _FontResolution * (*fontResFunc) ( /* no need for font.h */ ClientPtr /* pClient */, int * /* num */); -#ifdef SMART_SCHEDULE int smart_priority; long smart_start_tick; long smart_stop_tick; long smart_check_tick; -#endif DeviceIntPtr clientPtr; } ClientRec; -#ifdef SMART_SCHEDULE /* * Scheduling interface */ @@ -155,7 +152,6 @@ extern void SmartScheduleStopTimer(void); extern Bool SmartScheduleInit(void); -#endif /* This prototype is used pervasively in Xext, dix */ #define DISPATCH_PROC(func) int func(ClientPtr /* client */) diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index 8cb2b5a03..b8803e748 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -61,9 +61,6 @@ /* Support SHAPE extension */ #undef SHAPE -/* Include time-based scheduler */ -#undef SMART_SCHEDULE - /* Define to 1 on systems derived from System V Release 4 */ #undef SVR4 diff --git a/os/WaitFor.c b/os/WaitFor.c index f07388be4..d6dd99553 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -155,9 +155,7 @@ WaitForSomething(int *pClientsReady) int nready; fd_set devicesReadable; CARD32 now = 0; -#ifdef SMART_SCHEDULE Bool someReady = FALSE; -#endif FD_ZERO(&clientsReadable); @@ -170,7 +168,6 @@ WaitForSomething(int *pClientsReady) ProcessWorkQueue(); if (XFD_ANYSET (&ClientsWithInput)) { -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) { someReady = TRUE; @@ -179,13 +176,11 @@ WaitForSomething(int *pClientsReady) wt = &waittime; } else -#endif { XFD_COPYSET (&ClientsWithInput, &clientsReadable); break; } } -#ifdef SMART_SCHEDULE if (someReady) { XFD_COPYSET(&AllSockets, &LastSelectMask); @@ -193,7 +188,6 @@ WaitForSomething(int *pClientsReady) } else { -#endif wt = NULL; if (timers) { @@ -215,11 +209,9 @@ WaitForSomething(int *pClientsReady) } } XFD_COPYSET(&AllSockets, &LastSelectMask); -#ifdef SMART_SCHEDULE } SmartScheduleStopTimer (); -#endif BlockHandler((pointer)&wt, (pointer)&LastSelectMask); if (NewOutputPending) FlushAllOutput(); @@ -237,9 +229,7 @@ WaitForSomething(int *pClientsReady) } selecterr = GetErrno(); WakeupHandler(i, (pointer)&LastSelectMask); -#ifdef SMART_SCHEDULE SmartScheduleStartTimer (); -#endif if (i <= 0) /* An error or timeout occurred */ { if (dispatchException) @@ -263,7 +253,6 @@ WaitForSomething(int *pClientsReady) strerror(selecterr)); } } -#ifdef SMART_SCHEDULE else if (someReady) { /* @@ -273,7 +262,6 @@ WaitForSomething(int *pClientsReady) XFD_COPYSET(&ClientsWithInput, &clientsReadable); break; } -#endif if (*checkForInput[0] != *checkForInput[1]) return 0; @@ -310,10 +298,8 @@ WaitForSomething(int *pClientsReady) return 0; } } -#ifdef SMART_SCHEDULE if (someReady) XFD_ORSET(&LastSelectMask, &ClientsWithInput, &LastSelectMask); -#endif if (AnyClientsWriteBlocked && XFD_ANYSET (&clientsWritable)) { NewOutputPending = TRUE; @@ -411,11 +411,9 @@ ReadRequestFromClient(ClientPtr client) FD_SET(fd, &ClientsWithInput); else { -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) FD_CLR(fd, &ClientsWithInput); else -#endif YieldControlNoInput(); } } @@ -423,16 +421,12 @@ ReadRequestFromClient(ClientPtr client) { if (!gotnow) AvailableInput = oc; -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) FD_CLR(fd, &ClientsWithInput); else -#endif YieldControlNoInput(); } -#ifdef SMART_SCHEDULE if (SmartScheduleDisable) -#endif if (++timesThisConnection >= MAX_TIMES_PER) YieldControl(); if (move_header) diff --git a/os/osinit.c b/os/osinit.c index 986a6420c..74e2457f2 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -55,9 +55,7 @@ SOFTWARE. #include "osdep.h" #include <X11/Xos.h> -#ifdef SMART_SCHEDULE #include "dixstruct.h" -#endif #ifndef PATH_MAX #ifdef MAXPATHLEN @@ -199,11 +197,9 @@ OsInit(void) * log file name if logging to a file is desired. */ LogInit(NULL, NULL); -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) if (!SmartScheduleInit ()) SmartScheduleDisable = TRUE; -#endif } void diff --git a/os/utils.c b/os/utils.c index 88a64950d..96da35dd0 100644 --- a/os/utils.c +++ b/os/utils.c @@ -111,9 +111,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "opaque.h" -#ifdef SMART_SCHEDULE #include "dixstruct.h" -#endif #ifdef XKB #include <xkbsrv.h> @@ -552,10 +550,8 @@ void UseMsg(void) ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n"); #endif -#ifdef SMART_SCHEDULE ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n"); ErrorF("-schedInterval int Set scheduler interval in msec\n"); -#endif ErrorF("+extension name Enable extension\n"); ErrorF("-extension name Disable extension\n"); #ifdef XDMCP @@ -926,7 +922,6 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif -#ifdef SMART_SCHEDULE else if ( strcmp( argv[i], "-dumbSched") == 0) { SmartScheduleDisable = TRUE; @@ -950,7 +945,6 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } -#endif #ifdef RENDER else if ( strcmp( argv[i], "-render" ) == 0) { @@ -1234,7 +1228,6 @@ XNFstrdup(const char *s) return sd; } -#ifdef SMART_SCHEDULE #ifdef SIGVTALRM #define SMART_SCHEDULE_POSSIBLE @@ -1310,7 +1303,6 @@ SmartScheduleInit (void) return FALSE; #endif } -#endif #ifdef SIG_BLOCK static sigset_t PreviousSignalMask; |