Re: [PATCH RT 0/6] lockstat measurement extensions
From: Bill Huey (hui)
Date: Thu Mar 13 2008 - 20:40:27 EST
Sorry missing the patch. At Thomas's urging, this is inlined:
--- linux-2.6.24/kernel/sched.c 2008-02-25 15:32:05.000000000 -0800
+++ linux-2.6.24.working/kernel/sched.c 2008-03-13 13:53:24.000000000 -0700
@@ -1175,6 +1175,20 @@
return cpu_curr(task_cpu(p)) == p;
}
+int task_spinnable(struct task_struct *p)
+{
+/*
+ * The use of task_curr can crash the system since the struct
thread_info seems
+ * to disappear when dereferenced arbitrarily, so becareful.
+ */
+#ifdef CONFIG_SMP
+ if (p && p->se.on_rq && task_curr(p))
+ return 1;
+#else
+ return 0;
+#endif
+}
+
/* Used instead of source_load when we know the type == 0 */
unsigned long weighted_cpuload(const int cpu)
{
@@ -1239,6 +1253,11 @@
*new_cfsrq = cpu_cfs_rq(old_cfsrq, new_cpu);
u64 clock_offset;
+//--billh
+// if (old_cpu >= NR_CPUS)
+// panic("bogus cpu id %u\n", old_cpu);
+//
+//
clock_offset = old_rq->clock - new_rq->clock;
#ifdef CONFIG_SCHEDSTATS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/