public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, zheng.z.yan@intel.com
Subject: Re: [PATCH]sched: convert wall-time to vruntime for check_preempt_tick
Date: Thu, 07 Apr 2011 15:34:20 +0200	[thread overview]
Message-ID: <1302183260.8065.9.camel@marge.simson.net> (raw)
In-Reply-To: <20110407124332.GA31809@sli10-conroe.sh.intel.com>

On Thu, 2011-04-07 at 20:43 +0800, Shaohua Li wrote:
> In check_preempt_tick(), delta is vruntime and ideal_runtime is wall runtime.
> Comparing vruntime and ideal_runtime looks buggy.

Why is that buggy?  It's a distance in units ns, ala wakeup_granularity,
a number.  This number just happens to be variable.

> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> 
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 3f7ec9e..0b76e3a 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -1121,7 +1121,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
>  		if (delta < 0)
>  			return;
>  
> -		if (delta > ideal_runtime)
> +		if (delta > calc_delta_fair(ideal_runtime, curr))
>  			resched_task(rq_of(cfs_rq)->curr);
>  	}
>  }
> --
> 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/



  reply	other threads:[~2011-04-07 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 12:43 [PATCH]sched: convert wall-time to vruntime for check_preempt_tick Shaohua Li
2011-04-07 13:34 ` Mike Galbraith [this message]
2011-04-08  0:35   ` Shaohua Li
2011-04-08  2:49     ` Mike Galbraith
2011-04-08  4:55       ` Shaohua Li
2011-04-08  5:31         ` Mike Galbraith

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=1302183260.8065.9.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shaohua.li@intel.com \
    --cc=zheng.z.yan@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