Skip to content

Instantly share code, notes, and snippets.

@EJSohn
Created April 28, 2019 11:09
Show Gist options
  • Save EJSohn/dfb5010b1ef91221e93da4dc13f522bd to your computer and use it in GitHub Desktop.
Save EJSohn/dfb5010b1ef91221e93da4dc13f522bd to your computer and use it in GitHub Desktop.
s = int_sqrt(cpu_time);
if (s)
points /= s;
s = int_sqrt(int_sqrt(run_time));
if (s)
points /= s;
/*
* Niced processes are most likely less important, so double
* their badness points.
*/
if (task_nice(p) > 0)
points *= 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment