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


Groups > linux.kernel > #1350849

Re: [PATCH] sched/deadline: remove dl_new from sched_dl_entity

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] sched/deadline: remove dl_new from sched_dl_entity
Date 2016-03-05 10:00 +0100
Message-ID <r9ge6-3AS-13@gated-at.bofh.it> (permalink)
References <r8Xl8-6QX-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Luca Abeni <luca.abeni@unitn.it> wrote:

> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 57b939c..e0c4456 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -352,7 +352,14 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se,
>  	struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
>  	struct rq *rq = rq_of_dl_rq(dl_rq);
>  
> -	WARN_ON(!dl_se->dl_new || dl_se->dl_throttled);
> +	WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline));
> +
> +	/* We are racing with the deadline timer. So, do nothing because
> +	   the deadline timer handler will take care of properly recharging
> +	   the runtime and postponing the deadline
> +	 */
> +	if(dl_se->dl_throttled)
> +		return;

Obligatory:

Please use the customary (multi-line) comment style:

  /*
   * Comment .....
   * ...... goes here.
   */

... specified in Documentation/CodingStyle.

>  static void switched_to_dl(struct rq *rq, struct task_struct *p)
>  {
> +	if (dl_time_before(p->dl.deadline, rq_clock(rq))) {
> +		setup_new_dl_entity(&p->dl, &p->dl);
> +	}

Obligatory:

Please don't use curly braces around single statements.

Thanks,

	Ingo

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


Thread

[PATCH] sched/deadline: remove dl_new from sched_dl_entity Luca Abeni <luca.abeni@unitn.it> - 2016-03-04 13:50 +0100
  Re: [PATCH] sched/deadline: remove dl_new from sched_dl_entity Ingo Molnar <mingo@kernel.org> - 2016-03-05 10:00 +0100
    Re: [PATCH] sched/deadline: remove dl_new from sched_dl_entity luca abeni <luca.abeni@unitn.it> - 2016-03-05 22:00 +0100

csiph-web