Skip to content

Commit

Permalink
Revert "sched/fair: Record the average duration of a task"
Browse files Browse the repository at this point in the history
This reverts commit d2d5de1.
  • Loading branch information
xanmod committed Oct 10, 2023
1 parent 39e8c03 commit 00ca249
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,6 @@ struct sched_entity {
u64 prev_sum_exec_runtime;

u64 nr_migrations;
u64 prev_sleep_sum_runtime;
/* average duration of a task */
u64 dur_avg;

#ifdef CONFIG_FAIR_GROUP_SCHED
int depth;
Expand Down
2 changes: 0 additions & 2 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4388,8 +4388,6 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
p->se.prev_sum_exec_runtime = 0;
p->se.nr_migrations = 0;
p->se.vruntime = 0;
p->se.dur_avg = 0;
p->se.prev_sleep_sum_runtime = 0;
INIT_LIST_HEAD(&p->se.group_node);

#ifdef CONFIG_FAIR_GROUP_SCHED
Expand Down
1 change: 0 additions & 1 deletion kernel/sched/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
__PS("nr_involuntary_switches", p->nivcsw);

P(se.load.weight);
P(se.dur_avg);
#ifdef CONFIG_SMP
P(se.avg.load_sum);
P(se.avg.runnable_sum);
Expand Down
13 changes: 0 additions & 13 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -6176,18 +6176,6 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)

static void set_next_buddy(struct sched_entity *se);

static inline void dur_avg_update(struct task_struct *p, bool task_sleep)
{
u64 dur;

if (!task_sleep)
return;

dur = p->se.sum_exec_runtime - p->se.prev_sleep_sum_runtime;
p->se.prev_sleep_sum_runtime = p->se.sum_exec_runtime;
update_avg(&p->se.dur_avg, dur);
}

/*
* The dequeue_task method is called before nr_running is
* decreased. We remove the task from the rbtree and
Expand Down Expand Up @@ -6260,7 +6248,6 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)

dequeue_throttle:
util_est_update(&rq->cfs, p, task_sleep);
dur_avg_update(p, task_sleep);
hrtick_update(rq);
}

Expand Down

0 comments on commit 00ca249

Please sign in to comment.