Re: [RFC PATCH 11/11] sched/fair: Refactor select_task_rq_fair()
From: Yuyang Du
Date: Thu Jun 16 2016 - 05:54:53 EST
On Thu, Jun 16, 2016 at 09:49:35AM +0800, Yuyang Du wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index f15461f..1ab41b8 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4986,12 +4986,14 @@ static void record_wakee(struct task_struct *p)
> */
> if (time_after(jiffies, current->wakee_flip_decay_ts + HZ)) {
> current->wakee_flips >>= 1;
> + current->wakee_count >>= 1;
> current->wakee_flip_decay_ts = jiffies;
> }
>
> if (current->last_wakee != p) {
> current->last_wakee = p;
> current->wakee_flips++;
> }
So sorry that:
current->wakee_count++;
should be moved out of the if statement.