mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: XingChao Wang <wxc200@gmail.com>
To: kernel list <linux-kernel@vger.kernel.org>
Cc: mingo@elte.hu, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: check_preempt_tick() check vruntime mistake?
Date: Fri, 11 Dec 2009 12:17:50 +0800	[thread overview]
Message-ID: <fd6b62c10912102017g56b8651aj2b8cbe569b0f90a6@mail.gmail.com> (raw)

Hi Ingo,peter,

When check_preempt_tick() selects next leftmost sched_entity,it
calculates delta vruntime of curr and leftmost entity, then compares
it with ideal_runtime. But ideal_runtime is real-time type, need
convert it to virtual-time ,right?

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 37087a7..9b903d4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -840,7 +840,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct
sched_entity *curr)
                struct sched_entity *se = __pick_next_entity(cfs_rq);
                s64 delta = curr->vruntime - se->vruntime;

-               if (delta > ideal_runtime)
+               if (delta > calc_delta_fair(ideal_runtime, curr))
                        resched_task(rq_of(cfs_rq)->curr);
        }
 }

thanks
--wang xingchao

             reply	other threads:[~2009-12-11  4:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11  4:17 XingChao Wang [this message]
2009-12-11  7:25 ` 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=fd6b62c10912102017g56b8651aj2b8cbe569b0f90a6@mail.gmail.com \
    --to=wxc200@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®