IMHO, by making it this “lean” all you have done is make it a mode which helps you right now since you are concentrating on the HTC environment. If you want to make a leaner scheduler path, that is certainly possible. It might actually be a useful scheduling path FOR the HTC environment. The main slowness that you are concerned is node search (and maybe calendaring). Right node in check_nodes(), there are 2 paths. The bucket path, and the much more comprehensive but slower normal node path. I say write a third path.
Do the following:
- Only allow a non-plussed spec (pluses add more complexity).
- ignore the place directive
- ignore placement sets
This way you write a super lean loop that just calls eval_simple_selspec() N times for N chunks.
Maybe also have a check that turns off calendaring completely. If strict_ordering is false, don’t create or add anything to the calendar. There is an O(N) loop in run_update_resresv() which adds the end event to the calendar.
Let the rest of the scheduler do its thing. It isn’t as lean as you are suggesting, but it is probably lean enough.
If you really do want something like you are suggesting, don’t modify the scheduler. PBS was written with the idea of pluggable schedulers. Just write a new binary and link libsched.a for what you need of it.