Messages in this thread | | | Subject | Re: sched: fix/optimise some issues | From | Peter Zijlstra <> | Date | Wed, 20 Jul 2011 21:11:33 +0200 |
| |
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |