[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9810cff90803131740w6a71b61dy1183956132fa89a3@mail.gmail.com>
Date: Thu, 13 Mar 2008 17:40:08 -0700
From: "Bill Huey (hui)" <bill.huey@...il.com>
To: "Gregory Haskins" <ghaskins@...ell.com>, mingo@...e.hu
Cc: a.p.zijlstra@...llo.nl, tglx@...utronix.de, rostedt@...dmis.org,
linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
kevin@...man.org, cminyard@...sta.com, dsingleton@...sta.com,
dwalker@...sta.com, npiggin@...e.de, dsaxena@...xity.net,
ak@...e.de, pavel@....cz, acme@...hat.com, gregkh@...e.de,
sdietrich@...ell.com, pmorreale@...ell.com, mkohari@...ell.com
Subject: Re: [PATCH RT 0/6] lockstat measurement extensions
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@...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