Sleeping at PUSER when coming from a sysctl context is purely arbitrary.
I'd like to reduce the number of PUSER usages to help people understand
the current scheduler logic.
Ok?
Index: arch/i386/i386/esm.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/esm.c,v
retrieving revision 1.59
diff -u -p -r1.59 esm.c
--- arch/i386/i386/esm.c 8 Sep 2015 07:12:56 -0000 1.59
+++ arch/i386/i386/esm.c 1 Jun 2019 16:05:18 -0000
@@ -331,7 +331,7 @@ esm_watchdog(void *arg, int period)
* should have a process context we can sleep in.
*/
while (sc->sc_step != 0) {
- if (tsleep(sc, PUSER | PCATCH, "esm", 0) == EINTR) {
+ if (tsleep(sc, PWAIT | PCATCH, "esm", 0) == EINTR) {
splx(s);
return (sc->sc_wdog_period);
}