NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/40505: delay(9) is a MD non-interface



On 19/07/14 01:00, Masao Uebayashi wrote:
  For sys/kern/subr_prf.c:vpanic(), whose DELAY() is "I have nothing to
  do", it can be replaced with MI function cpu_idle().  Question is, how
  to implement it in rump.

cpu_idle() is not a MI function interface, from cpu.h:
#ifndef cpu_idle
void cpu_idle(void);
#endif

For that particular DELAY(), it might as well be "continue".

But to answer your question anyway: you can't meaningfully, rump kernels do not schedule threads onto cores (they run on threads which schedule cores), so "core is idle" does not make sense.

If you really have a strong use case for not spinning before reboot in case >1 cores panic, from the rump kernel perspective it is best to define a true interface, e.g. cpu_panicwait(), and call cpu_idle() in the kern_cpu.c implementation and sleep in a rump kernel.

Home | Main Index | Thread Index | Old Index