correcting changelog entry. adding missing sched_bfs function
[kernel-bfs] / kernel-power-2.6.28 / debian / patches / bfs.patch
index 79c6c85..098ba2a 100644 (file)
@@ -3270,6 +3270,30 @@ index 0000000..7cc1752
 +      return ns;
 +}
 +
++/*
++ * Return sum_exec_runtime for the thread group.
++ * In case the task is currently running, return the sum plus current's
++ * pending runtime that have not been accounted yet.
++ *
++ * Note that the thread group might have other running tasks as well,
++ * so the return value not includes other pending runtime that other
++ * running tasks might have.
++ */
++unsigned long long thread_group_sched_runtime(struct task_struct *p)
++{
++      struct task_cputime totals;
++      unsigned long flags;
++      struct rq *rq;
++      u64 ns;
++
++      rq = task_grq_lock(p, &flags);
++      thread_group_cputime(p, &totals);
++      ns = totals.sum_exec_runtime + do_task_delta_exec(p, rq);
++      task_grq_unlock(&flags);
++
++      return ns;
++}
++
 +/* Compatibility crap for removal */
 +void account_user_time(struct task_struct *p, cputime_t cputime,
 +                     cputime_t cputime_scaled)