lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ