VirtualBox

Changes between Version 1 and Version 2 of Ticket #19845, comment 6


Ignore:
Timestamp:
Sep 3, 2020 10:15:34 AM (4 years ago)
Author:
Frank Batschulat (Oracle)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19845, comment 6

    v1 v2  
    4141For the rest of the cases of SCHED_NORMAL we should probably use sched_set_normal()
    4242and set a nice value instead of the current priority for sched_setscheduler().
     43
     44Eg something like this is a start and with that, no more other failures crop up
     45with 5.9-rc3
     46{{{
     47Index: src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
     48===================================================================
     49--- src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c  (revision 140198)
     50+++ src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c  (working copy)
     51@@ -78,13 +78,21 @@
     52             break;
     53 
     54         case RTTHREADTYPE_IO:
     55+# if RTLNX_VER_MAX(5,9,0)
     56             iSchedClass = SCHED_FIFO;
     57             Param.sched_priority = MAX_RT_PRIO - 1;
     58+# else
     59+            sched_set_fifo(current);
     60+# endif
     61             break;
     62 
     63         case RTTHREADTYPE_TIMER:
     64+# if RTLNX_VER_MAX(5,9,0)
     65             iSchedClass = SCHED_FIFO;
     66             Param.sched_priority = 1; /* not 0 just in case */
     67+# else
     68+            sched_set_fifo_low(current);
     69+# endif
     70             break;
     71 
     72         default:
     73@@ -91,8 +99,13 @@
     74             AssertMsgFailed(("enmType=%d\n", enmType));
     75             return VERR_INVALID_PARAMETER;
     76     }
     77-
     78+# if RTLNX_VER_MAX(5,9,0)
     79     sched_setscheduler(current, iSchedClass, &Param);
     80+# else
     81+/* XXX handle SCHED_NORMAL case! */
     82+     RT_NOREF_PV(iSchedClass);
     83+     RT_NOREF_PV(Param);
     84+# endif
     85 #else
     86     RT_NOREF_PV(enmType);
     87 #endif
     88}}}

© 2023 Oracle
ContactPrivacy policyTerms of Use