kernel: new DEBUG_RACE option. try to provoke race conditions between processes.

it does this by 
  - making all processes interruptible by running out of quantum
  - giving all processes a single tick of quantum
  - picking a random runnable process instead of in order, and
    from a single pool of runnable processes (no priorities)

This together with very high HZ values currently provokes some race conditions
seen earlier only when running with SMP.
This commit is contained in:
Ben Gras
2010-05-08 18:00:03 +00:00
parent d5a0af826a
commit a1636b85b7
3 changed files with 54 additions and 0 deletions

View File

@@ -30,6 +30,13 @@
/* Verbose messages. */
#define DEBUG_TRACE 0
/* DEBUG_RACE makes every process preemptible, schedules
* every process on the same priority queue, and randomizes
* the next process to run, in order to help catch race
* conditions that could otherwise be masked.
*/
#define DEBUG_RACE 0
#if DEBUG_TRACE
#define VF_SCHEDULING (1L << 1)