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]
Message-Id: <1189710530.5643.8.camel@lappy>
Date:	Thu, 13 Sep 2007 21:08:50 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Kyle Moffett <mrmacman_g4@....com>
Cc:	Roman Zippel <zippel@...ux-m68k.org>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, Mike Galbraith <efault@....de>
Subject: Re: [announce] CFS-devel, performance improvements

On Thu, 2007-09-13 at 14:28 -0400, Kyle Moffett wrote:

>  with the exception of one patch that's missing a changelog entry.

Ah, that would have been one of mine.

---
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>

Handle vruntime overflow by centering the key space around min_vruntime.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
     kernel/sched_fair.c |   15 +++++++++++----
     1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a306f05..b8e2a0d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -116,11 +116,18 @@ set_leftmost(struct cfs_rq *cfs_rq, struct rb_node *leftmost)
 	cfs_rq->rb_leftmost = leftmost;
 	if (leftmost) {
 		se = rb_entry(leftmost, struct sched_entity, run_node);
-		cfs_rq->min_vruntime = max(se->vruntime,
-						cfs_rq->min_vruntime);
+		if ((se->vruntime > cfs_rq->min_vruntime) ||
+		    (cfs_rq->min_vruntime > (1ULL << 61) &&
+		     se->vruntime < (1ULL << 50)))
+			cfs_rq->min_vruntime = se->vruntime;
 	}
 }
 
+s64 entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se)
+{
+	return se->fair_key - cfs_rq->min_vruntime;
+}
+
 /*
  * Enqueue an entity into the rb-tree:
  */
@@ -130,7 +137,7 @@ __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
 	struct rb_node **link = &cfs_rq->tasks_timeline.rb_node;
 	struct rb_node *parent = NULL;
 	struct sched_entity *entry;
-	s64 key = se->fair_key;
+	s64 key = entity_key(cfs_rq, se);
 	int leftmost = 1;
 
 	/*
@@ -143,7 +150,7 @@ __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
 		 * We dont care about collisions. Nodes with
 		 * the same key stay together.
 		 */
-		if (key - entry->fair_key < 0) {
+		if (key < entity_key(cfs_rq, entry)) {
 			link = &parent->rb_left;
 		} else {
 			link = &parent->rb_right;


-
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