On Wed, Aug 12, 2015 at 02:22:09PM -0400, Chris Metcalf wrote:
On 08/12/2015 12:00 PM, Frederic Weisbecker wrote:Hmm, ok I'm going to discuss that in the new version. One worry is that
I don't know exactly what you have in mind. The theory is that+#ifdef CONFIG_CPU_ISOLATEDI'm still uncomfortable with that. A wake up model could work?
+void cpu_isolated_wait(void)
+{
+ set_current_state(TASK_INTERRUPTIBLE);
+ _cpu_idle();
+ set_current_state(TASK_RUNNING);
+}
at this point we're ready to return to user space and we're just
waiting for a timer tick that is guaranteed to arrive, since there
is something pending for the timer.
it gets racy and we sleep there for ever.
And, this is an arch-specific method anyway; the generic methodYes but we do busy waiting on all other archs then. And since we can wait
is actually checking to see if a signal has been delivered,
scheduling is needed, etc., each time around the loop, so if
you're not sure your architecture will do the right thing, just
don't provide a method that idles while waiting. For tilegx I'm
sure it works correctly, so I'm OK providing that method.
for a while there, it doesn't look sane.