On Mon, Sep 28, 2015 at 11:17:17AM -0400, Chris Metcalf wrote:
diff --git a/include/linux/isolation.h b/include/linux/isolation.hOk, I may be a bit burdening with that but, how about using the regular
new file mode 100644
index 000000000000..fd04011b1c1e
--- /dev/null
+++ b/include/linux/isolation.h
@@ -0,0 +1,24 @@
+/*
+ * Task isolation related global functions
+ */
+#ifndef _LINUX_ISOLATION_H
+#define _LINUX_ISOLATION_H
+
+#include <linux/tick.h>
+#include <linux/prctl.h>
+
+#ifdef CONFIG_TASK_ISOLATION
+static inline bool task_isolation_enabled(void)
+{
+ return tick_nohz_full_cpu(smp_processor_id()) &&
+ (current->task_isolation_flags & PR_TASK_ISOLATION_ENABLE);
existing task flags, and if needed later we can still introduce a new field
in struct task_struct?
+ while (READ_ONCE(dev->next_event.tv64) != KTIME_MAX) {You should add a function in tick-sched.c to get the next tick. This
is supposed to be a private field.
+ if (!warned && (jiffies - start) >= (5 * HZ)) {Why not use signal_pending()?
+ pr_warn("%s/%d: cpu %d: task_isolation task blocked for %ld seconds\n",
+ task->comm, task->pid, smp_processor_id(),
+ (jiffies - start) / HZ);
+ warned = true;
+ }
+ cond_resched();
+ if (test_thread_flag(TIF_SIGPENDING))
+ break;
I still think we could try a wait-wake standard scheme.