[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1311189093.29152.74.camel@twins>
Date: Wed, 20 Jul 2011 21:11:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: stephan.baerwolf@...ilmenau.de
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
ncrao@...gle.com
Subject: Re: sched: fix/optimise some issues
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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists