Index: kernel/generic/src/sysinfo/stats.c
===================================================================
--- kernel/generic/src/sysinfo/stats.c	(revision bd01a4e2eea1f1c2d0ae1323bcebe495b503e8a1)
+++ kernel/generic/src/sysinfo/stats.c	(revision 9efff92fe17a9135c9577f15b3c4d7bb711366c2)
@@ -619,38 +619,12 @@
  *
  */
-static inline load_t load_calc(load_t load, load_t exp, size_t ready)
+static inline load_t load_calc(load_t load, load_t exp, atomic_count_t ready)
 {
 	load *= exp;
-	load += ready * (LOAD_FIXED_1 - exp);
+	load += (ready << LOAD_FIXED_SHIFT) * (LOAD_FIXED_1 - exp);
 	
 	return (load >> LOAD_FIXED_SHIFT);
 }
 
-/** Count threads in ready queues
- *
- * Should be called with interrupts disabled.
- *
- */
-static inline size_t get_ready_count(void)
-{
-	size_t i;
-	size_t count = 0;
-	
-	for (i = 0; i < config.cpu_count; i++) {
-		spinlock_lock(&cpus[i].lock);
-		
-		size_t j;
-		for (j = 0; j < RQ_COUNT; j++) {
-			spinlock_lock(&cpus[i].rq[j].lock);
-			count += cpus[i].rq[j].n;
-			spinlock_unlock(&cpus[i].rq[j].lock);
-		}
-		
-		spinlock_unlock(&cpus[i].lock);
-	}
-	
-	return count;
-}
-
 /** Load computation thread.
  *
@@ -665,9 +639,9 @@
 	
 	while (true) {
+		atomic_count_t ready = atomic_get(&nrdy);
+		
 		/* Mutually exclude with get_stats_load() */
 		ipl_t ipl = interrupts_disable();
 		spinlock_lock(&load_lock);
-		
-		size_t ready = get_ready_count() * LOAD_FIXED_1;
 		
 		unsigned int i;
