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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Nov 2006 15:55:10 -0800
From:	"Chen, Kenneth W" <kenneth.w.chen@...el.com>
To:	<nickpiggin@...oo.com.au>, "'Ingo Molnar'" <mingo@...e.hu>,
	"Siddha, Suresh B" <suresh.b.siddha@...el.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: [patch] sched: optimize activate_task for RT task - v2

Perhaps the following is a better patch compare to earlier one.
The p->sleep_type are only for SCHED_NORMAL as well, so we can
bypass them altogether in one shot.




RT task does not participate in interactiveness priority and thus
shouldn't be bothered with timestamp and p->sleep_type manipulation
when task is being put on run queue.  Bypass all of the them with
a single if (rt_task) test.


Signed-off-by: Ken Chen <kenneth.w.chen@...el.com>

--- ./kernel/sched.c.orig	2006-11-14 13:29:37.000000000 -0800
+++ ./kernel/sched.c	2006-11-14 14:05:39.000000000 -0800
@@ -938,6 +938,9 @@ static void activate_task(struct task_st
 {
 	unsigned long long now;
 
+	if (rt_task(p))
+		goto out;
+
 	now = sched_clock();
 #ifdef CONFIG_SMP
 	if (!local) {
@@ -947,9 +950,7 @@ static void activate_task(struct task_st
 			+ rq->timestamp_last_tick;
 	}
 #endif
-
-	if (!rt_task(p))
-		p->prio = recalc_task_prio(p, now);
+	p->prio = recalc_task_prio(p, now);
 
 	/*
 	 * This checks to make sure it's not an uninterruptible task
@@ -974,7 +975,7 @@ static void activate_task(struct task_st
 		}
 	}
 	p->timestamp = now;
-
+out:
 	__activate_task(p, rq);
 }
 
-
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