Skip to content

Instantly share code, notes, and snippets.

@anuvrat
Created April 15, 2012 06:53
Show Gist options
  • Select an option

  • Save anuvrat/2390598 to your computer and use it in GitHub Desktop.

Select an option

Save anuvrat/2390598 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