diff options
author | Michael Sweet <michael.r.sweet@gmail.com> | 2017-10-02 19:14:25 -0400 |
---|---|---|
committer | Michael Sweet <michael.r.sweet@gmail.com> | 2017-10-02 19:14:25 -0400 |
commit | e4e371946b2ddb8adfb03c637992b0b3d3575f5f (patch) | |
tree | 01032b18f02ea60c169b9bf4117233dfa3645f0d /scheduler/client.c | |
parent | 9d4ae311cb628b5d183f850d2be0f19e164bf795 (diff) | |
download | cups-e4e371946b2ddb8adfb03c637992b0b3d3575f5f.tar.gz |
The scheduler did not run with a high enough priority, causing problems on
busy systems (rdar://33789342)
- Change ProcessType to Adaptive for both cupsd and cups-lpd
- Add "working" parameter to cupsdSetBusyState
- Call cupsdSetBusyState on startup to boost the priority on startup.
Diffstat (limited to 'scheduler/client.c')
-rw-r--r-- | scheduler/client.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scheduler/client.c b/scheduler/client.c index 78695ae65..d628dc6c3 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -85,6 +85,8 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */ if (cupsArrayCount(Clients) == MaxClients) return; + cupsdSetBusyState(1); + /* * Get a pointer to the next available client... */ @@ -439,7 +441,7 @@ cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */ if (httpGetFd(con->http) >= 0) { cupsArrayRemove(ActiveClients, con); - cupsdSetBusyState(); + cupsdSetBusyState(0); #ifdef HAVE_SSL /* @@ -760,7 +762,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ if (!cupsArrayFind(ActiveClients, con)) { cupsArrayAdd(ActiveClients, con); - cupsdSetBusyState(); + cupsdSetBusyState(0); } case HTTP_STATE_OPTIONS : @@ -2082,7 +2084,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ else { cupsArrayRemove(ActiveClients, con); - cupsdSetBusyState(); + cupsdSetBusyState(0); } } } @@ -2807,7 +2809,7 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */ else { cupsArrayRemove(ActiveClients, con); - cupsdSetBusyState(); + cupsdSetBusyState(0); } } } |