-
Andreas Hartmetz authored
puts stuff where it intends to find it later instead of figuring out everything again and again on every job start or other operation. Per host and per protocol connection limits are enabled by default and there is no way to turn them off, currently. There are now twenty priority levels for jobs. Hopefully KHTML and friends can put them to good use and ditch their own scheduling code more or less. A regression is that deadlocks due to the limited connection numbers are currently possible, but this is fixable. This has not caused me any problems so far. On the upside, a 100% CPU usage while not loading pages bug that has been reported on IRC should be fixed. Here is the list of commits I kept in git-svn: - First checkin of new scheduler code - fix the build - Add SerialPicker, remove a lot of old code - Start connected slaves implementation - some more work on finishing a job, removed a lot of old code - start work on staggered starting of jobs - some work on creating slaves and starting jobs - squirrels [edit: this added a method originally called doPleaseFetchRareSquirrelPorn() which is now called startAJob :)] - More work on connected slaves, some cleanups, compile - compile: run moc on both scheduler.cpp and scheduler.h - different names for different things - more work on connected ioslaves. maybe 60% there now... - fix a few of the first crashes found during real testing - Implement allSlaves() everywhere to account for all slaves, plus small stuff - Reap idle slaves - Delete all slaves when shutting down, hopefully - Delete *and kill* all slaves when shutting down - Set pid to zero after kill so we only kill something once! - Maybe-finished connected slave support, some cleanup - Move "internal" class definitions to private header file - Initialize idle time variable of ioslave - start idle time when slave starts idling - Simplify the scattered job-done logic, kill more slaves - Observe per host and per protocol connection number limits. Yay! - Use provided job argument, do not try to get the job from the slave which will not work. - Make removeSlave() work, hopefully - compile - Add much debug output, remove job from regular queue when assigning to connected slave. - Fix removing jobs and robustify host connection limits logic - Fix connected slave starting and removal; involves not taking the running job off the list. - Implement changeJobPriority(), add more checks to ConnectedSlaveQueue::removeJob() - Fix checking whether the job has a properly assigned serial number, and make scheduleJob() decrease (not increase) the logical priority - Oops, I did not want to commit this include addition. - Always set the slave's job to null when finishing the job one way or another - Sort out the putSlaveOnHold / finishing a job twice mess - Add diagnostic code and fix job accounting bug due to changing URL - Use the new KProtocolInfo::maxSlavesPerHost(). Cool! - compile -_- - In "release" mode, omit an assertion that may fail due to a rare non-error. - Improve comment about "fake death" of on-hold slaves - Improve again comment about "fake death" of on-hold slaves - Ensure that maxSlavesPerHost is compatible with maxSlaves - debug output to see why jobs don't start, and make sure that connection limits are always > 0. - Remove useless comment - Possibly correct version of "held slaves" assignment to jobs. - Remove unused debug_info() method svn path=/trunk/KDE/kdelibs/; revision=1075343
81c328cc