All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: Dario Faggioli <raistlin@linux.it>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] DLS: fix switched_from_dl
Date: Sun, 22 Apr 2012 18:10:53 +0200	[thread overview]
Message-ID: <4F942D8D.3060508@gmail.com> (raw)
In-Reply-To: <CAJd=RBAsSHp2KSnwF6h1fYCQyMCA-Lg31WNr9eTbuenkAU+vbw@mail.gmail.com>

On 04/10/2012 04:25 PM, Hillf Danton wrote:
> Pull only if the current task switches from DLS, since it was not preempted
> by pushable tasks waiting on other runqueues.
>
> Signed-off-by: Hillf Danton<dhillf@gmail.com>
> ---
>
> --- a/kernel/sched_dl.c	Mon Apr  9 19:39:56 2012
> +++ b/kernel/sched_dl.c	Tue Apr 10 21:23:52 2012
> @@ -1466,12 +1466,7 @@ static void switched_from_dl(struct rq *
>   		hrtimer_try_to_cancel(&p->dl.dl_timer);
>
>   #ifdef CONFIG_SMP
> -	/*
> -	 * Since this might be the only -deadline task on the rq,
> -	 * this is the right place to try to pull some other one
> -	 * from an overloaded cpu, if any.
> -	 */
> -	if (!rq->dl.dl_nr_running)
> +	if (p == rq->curr)
>   		pull_dl_task(rq);
>   #endif
>   }
> --

I'd stay with the original code. p (former -dl task) is going away
(changed its scheduling class from -dl to something else). If it was
the last -dl task on rq I'd probably want to pull someone else. No
assumptions needed in this case.

Thanks,

- Juri

      reply	other threads:[~2012-04-22 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 14:25 [patch] DLS: fix switched_from_dl Hillf Danton
2012-04-22 16:10 ` Juri Lelli [this message]

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=4F942D8D.3060508@gmail.com \
    --to=juri.lelli@gmail.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raistlin@linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.