public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: stephan.baerwolf@tu-ilmenau.de
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	ncrao@google.com
Subject: Re: sched: fix/optimise some issues
Date: Wed, 20 Jul 2011 21:11:33 +0200	[thread overview]
Message-ID: <1311189093.29152.74.camel@twins> (raw)
In-Reply-To: <4E26DB41.9070002@tu-ilmenau.de>

On Wed, 2011-07-20 at 15:42 +0200, Stephan Bärwolf wrote:
> "entity_key()" is only used in "__enqueue_entity()" and
> its only function is to subtract a tasks vruntime by
> its groups minvruntime.
> Before this patch a rbtree enqueue-decision is done by
> comparing two tasks in the style:
> 
>         "if (entity_key(cfs_rq, se) < entity_key(cfs_rq, entry))"
> 
> which would be
> 
>         "if (se->vruntime-cfs_rq->min_vruntime < entry->vruntime-cfs_rq->min_vruntime)"
> 
> or (if reducing cfs_rq->min_vruntime out)
> 
>         "if (se->vruntime < entry->vruntime)"
> 
> which is
> 
>         "if (entity_before(se, entry))"
> 
> So we do not need "entity_key()".
> If "entity_before()" is inline we will also save one subtraction (only one,
> because "entity_key(cfs_rq, se)"  was cached in "key") 

Indeed, thanks!

  parent reply	other threads:[~2011-07-20 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 13:42 sched: fix/optimise some issues Stephan Bärwolf
2011-07-20 19:11 ` Peter Zijlstra
2011-07-21  1:00   ` Mike Galbraith
2011-07-20 19:11 ` Peter Zijlstra [this message]
2011-07-20 19:11 ` Peter Zijlstra
2011-07-21 15:08 ` Peter Zijlstra
2011-07-21 16:36   ` Stephan Bärwolf
2011-07-21 16:32     ` Peter Zijlstra
2011-07-21 16:43     ` Peter Zijlstra
2011-07-21 16:51     ` Peter Zijlstra

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=1311189093.29152.74.camel@twins \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=stephan.baerwolf@tu-ilmenau.de \
    /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