2 * Copyright 2013, Paweł Dziepak, pdziepak@quarnos.org.
3 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
6 #ifndef KERNEL_SCHEDULER_COMMON_H
7 #define KERNEL_SCHEDULER_COMMON_H
13 #include <kscheduler.h>
14 #include <load_tracking.h>
17 #include <user_debugger.h>
18 #include <util/MinMaxHeap.h>
23 //#define TRACE_SCHEDULER
24 #ifdef TRACE_SCHEDULER
25 # define TRACE(...) dprintf_no_syslog(__VA_ARGS__)
27 # define TRACE(...) do { } while (false)
37 const int kLowLoad
= kMaxLoad
* 20 / 100;
38 const int kTargetLoad
= kMaxLoad
* 55 / 100;
39 const int kHighLoad
= kMaxLoad
* 70 / 100;
40 const int kMediumLoad
= (kHighLoad
+ kTargetLoad
) / 2;
41 const int kVeryHighLoad
= (kMaxLoad
+ kHighLoad
) / 2;
43 const int kLoadDifference
= kMaxLoad
* 20 / 100;
45 extern bool gSingleCore
;
46 extern bool gTrackCoreLoad
;
47 extern bool gTrackCPULoad
;
50 void init_debug_commands();
53 } // namespace Scheduler
56 #endif // KERNEL_SCHEDULER_COMMON_H