Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1176715

Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance()

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance()
Date 2015-07-03 18:40 +0200
Message-ID <pIcal-2qj-1@gated-at.bofh.it> (permalink)
References <pH4RB-4H3-27@gated-at.bofh.it> <pHiUy-n5-7@gated-at.bofh.it> <pHrEt-6sY-3@gated-at.bofh.it> <pHx7b-1sY-11@gated-at.bofh.it> <pHGWS-84M-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 02, 2015 at 07:25:11AM +0800, Yuyang Du wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 40a7fcb..f7cc1ef 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5898,6 +5898,10 @@ static int detach_tasks(struct lb_env *env)
>  		return 0;
>  
>  	while (!list_empty(tasks)) {
> +
> +		if (env->idle == CPU_NEWLY_IDLE && env->src_rq->nr_running <= 1)

Should we make that ->idle != CPU_NOT_IDLE ?

> +			break;
> +
>  		p = list_first_entry(tasks, struct task_struct, se.group_node);
>  
>  		env->loop++;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance() Peter Zijlstra <peterz@infradead.org> - 2015-07-03 18:40 +0200

csiph-web