Forgive me, there is typo in the above check. It should be "less than" since we are controlling negative lags.
It is possible to do something like this in check_preemption ?
delta = curr->fair_key - first->fair_key;
if (delta > ??? [scale it as you wish] ||
(curr->key > first->key) && (curr->wait_runtime > ??? [simple funtion of curr->weight]) )
preempt
Ting
A limit control on wait_runtime may prevent a high weight task from running for too long, so that others get executed a little earlier. Just a thought :-)