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-next>] [day] [month] [year] [list]
Date:	Tue, 5 May 2009 16:53:14 -0700
From:	Frank Rowand <frank.rowand@...sony.com>
To:	mingo@...hat.com
CC:	tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [patch] RT: calc_load() uses wrong variable to calculate RT load

In calc_load() use RT tasks to calculate the RT load.

Signed-off-by: Frank Rowand <frank.rowand@...sony.com>

---

Ingo,

In calc_load():

#ifdef CONFIG_PREEMPT_RT
                active_rt_tasks = count_active_rt_tasks();
#endif

but active_rt_tasks is then not used.  I have not read through enough code
to verify my supposition, but the obvious use of this variable would be for
the calculation of the RT load average.

If my supposition is correct, this patch fixes the problem.

The patch is compile tested only.

-Frank Rowand
Sony Corporation of America


Index: linux-2.6.29.2/kernel/timer.c
===================================================================
--- linux-2.6.29.2.orig/kernel/timer.c
+++ linux-2.6.29.2/kernel/timer.c
@@ -1249,9 +1249,9 @@ static inline void calc_load(unsigned lo
 			CALC_LOAD(avenrun[1], EXP_5, active_tasks);
 			CALC_LOAD(avenrun[2], EXP_15, active_tasks);
 #ifdef CONFIG_PREEMPT_RT
-			CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks);
-			CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks);
-			CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks);
+			CALC_LOAD(avenrun_rt[0], EXP_1, active_rt_tasks);
+			CALC_LOAD(avenrun_rt[1], EXP_5, active_rt_tasks);
+			CALC_LOAD(avenrun_rt[2], EXP_15, active_rt_tasks);
 #endif
 			count += LOAD_FREQ;
 

--
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