linux-kernel.vger.kernel.org archive mirror
 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 2/2] sched/deadline: fix pull if dl task who's prio changed is not on queue
Date: Tue, 25 Nov 2014 17:54:29 +0000	[thread overview]
Message-ID: <5474C255.6020703@arm.com> (raw)
In-Reply-To: <1416386103-90800-2-git-send-email-wanpeng.li@linux.intel.com>

Hi,

On 19/11/14 08:35, Wanpeng Li wrote:
> Dl task who is not on queue and it is also the curr task simultaneously 
> can not happen. In addition, pull since the priority of a not on queue 
> dl task doesn't make any sense.
> 
> This patch fix it by don't pull if dl task who's prio changed is not on 
> queue.
> 
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
> ---
>  kernel/sched/deadline.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index b9e44ae..4eaf55c 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1678,7 +1678,10 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
>  static void prio_changed_dl(struct rq *rq, struct task_struct *p,
>  			    int oldprio)
>  {
> -	if (task_on_rq_queued(p) || rq->curr == p) {
> +	if (!task_on_rq_queued(p))
> +		return;
> +
> +	if (rq->curr == p) {

Yeah. I already posted a patches for this, that I forgot to properly
post again :/. I'll do it soon.

Thanks,

- Juri

>  #ifdef CONFIG_SMP
>  		/*
>  		 * This might be too much, but unfortunately
> 


  reply	other threads:[~2014-11-25 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19  8:35 [PATCH 1/2] sched/deadline: reduce overhead if there are no scheduling parameters changed Wanpeng Li
2014-11-19  8:35 ` [PATCH 2/2] sched/deadline: fix pull if dl task who's prio changed is not on queue Wanpeng Li
2014-11-25 17:54   ` Juri Lelli [this message]
2014-11-25 22:55     ` Wanpeng Li
2014-11-25 17:49 ` [PATCH 1/2] sched/deadline: reduce overhead if there are no scheduling parameters changed Juri Lelli
2014-11-19 10:01 Wanpeng Li
2014-11-19 10:01 ` [PATCH 2/2] sched/deadline: fix pull if dl task who's prio changed is not on queue 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=5474C255.6020703@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;
as well as URLs for NNTP newsgroup(s).