mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@arm.com>
To: Wanpeng Li <wanpeng.li@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Kirill Tkhai <ktkhai@parallels.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/deadline: fix rq->dl.pushable_tasks bug in push_dl_task()
Date: Thu, 13 Nov 2014 09:30:16 +0000	[thread overview]
Message-ID: <54647A28.7080901@arm.com> (raw)
In-Reply-To: <1415258564-8573-1-git-send-email-wanpeng.li@linux.intel.com>

Hi,

On 06/11/14 07:22, Wanpeng Li wrote:
> Do not call dequeue_pushable_dl_task() when failing to push an eligible
> task, as it remains pushable, merely not at this particular moment. 
> Actually the patch is the same behavior as commit 311e800e16f6 ("sched, 
> rt: Fix rq->rt.pushable_tasks bug in push_rt_task()" in -rt side.
> 
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
> ---
>  kernel/sched/deadline.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index f3d7776..00324af 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1331,6 +1331,7 @@ static int push_dl_task(struct rq *rq)
>  {
>  	struct task_struct *next_task;
>  	struct rq *later_rq;
> +	int ret = 0;
>  
>  	if (!rq->dl.overloaded)
>  		return 0;
> @@ -1376,7 +1377,6 @@ retry:
>  			 * The task is still there. We don't try
>  			 * again, some other cpu will pull it when ready.
>  			 */
> -			dequeue_pushable_dl_task(rq, next_task);
>  			goto out;
>  		}
>  
> @@ -1392,6 +1392,7 @@ retry:
>  	deactivate_task(rq, next_task, 0);
>  	set_task_cpu(next_task, later_rq->cpu);
>  	activate_task(later_rq, next_task, 0);
> +	ret = 1;
>  
>  	resched_curr(later_rq);
>  
> @@ -1400,7 +1401,7 @@ retry:
>  out:
>  	put_task_struct(next_task);
>  
> -	return 1;
> +	return ret;
>  }
>  
>  static void push_dl_tasks(struct rq *rq)
> 

This looks good.

Acked-by: Juri Lelli <juri.lelli@arm.com>

Thanks,

- Juri


  parent reply	other threads:[~2014-11-13  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06  7:22 Wanpeng Li
2014-11-11  7:44 ` Wanpeng Li
2014-11-13  9:30 ` Juri Lelli [this message]
2014-11-16 12:32 ` [tip:sched/core] sched/deadline: Fix rq-> dl.pushable_tasks " tip-bot for Wanpeng Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54647A28.7080901@arm.com \
    --to=juri.lelli@arm.com \
    --cc=ktkhai@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=wanpeng.li@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome