This document describes the crazy scheduler tool.
The adding of new functionality to the kernel has meant that Inter-Process Communication (IPC) is no longer deterministic. The crazy scheduler is a tool that is designed to simulate the effect of IPC calls occurring at any time. With this tool, developers can check that their code will still work with the latest version of the kernel.
Crazy scheduler has two modes of operation:
Crazy delays
Crazy priorities
Ideally, the test cases should be run twice (once with each mode of the crazy scheduler).
This mode is used to test the effect of no longer being able to rely on thread priority to synchronize IPC calls. In this mode, an IPC call can occur at any time.
Your build should have the crazy scheduler present. It is present in the udeb version of a build and is disabled by default.
Crazy scheduler will only work on the udeb version of a build. Crazy scheduler in crazy priority mode does not impact the system as heavily as the crazy scheduler in crazy delay mode. Crazy Priority mode can only be enabled at ROM time or boot time (for the emulator). Do not expect this tool to find all the issues associated with IPC and synchronization. The crazy delay mode will slow the system down.
Format the user NAND (C:) partition using a regular ROM image before booting the build with the crazy scheduler enabled.
The Crazy scheduler can be used on both the emulator and hardware builds.
If the crazy scheduler is to be executed on hardware, then there are two ways to enable it:
Add the parameters -DCRAZYSCHEDDELAY (for the crazy delay) or -DCRAZYSCHEDPRIO (for crazy priority) to the buildrom arguments. Do not enable both parameters at the same time.
There are other ways of enabling the two modes of the crazy scheduler:
To enable the crazy priorities mode, include the following line into the relevant iby/oby file:
CRAZYSCHEDULING(on)
To enable the crazy delay mode , include the following line into the relevant iby/oby file:
kerneltrace 0x80000000 0 0x20 0 0 0 0 0
If the crazy scheduler is to run on the emulator, then:
To enable crazy delays, add the following line to the \epoc\data\epoc.ini file:
debugmask2 0x20
To enable crazy priorities, add the following line to the \epoc32\data\epoc.ini file:
crazyscheduling on
The crazy delays can be toggled on or off at runtime.
To do this, EShell must be running. The following commands can be used from within EShell:
The state of the crazy scheduler can be obtained by executing the following in EShell:
sysinfo
The output will tell you which of the crazy scheduler modes are enabled or disabled.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.