Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/sched_4bsd.c
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
| #ifdef HWT_HOOKS | #ifdef HWT_HOOKS | ||||
| #include <dev/hwt/hwt_hook.h> | #include <dev/hwt/hwt_hook.h> | ||||
| #endif | #endif | ||||
| /* | /* | ||||
| * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in | * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in | ||||
| * the range 100-256 Hz (approximately). | * the range 100-256 Hz (approximately). | ||||
| */ | */ | ||||
| #ifdef SMP | |||||
| #define INVERSE_ESTCPU_WEIGHT (8 * smp_cpus) | |||||
| #else | |||||
| #define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ | #define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ | ||||
| #endif | |||||
| #define NICE_WEIGHT 1 /* Priorities per nice level. */ | #define NICE_WEIGHT 1 /* Priorities per nice level. */ | ||||
| #define ESTCPULIM(e) \ | #define ESTCPULIM(e) \ | ||||
| min((e), INVERSE_ESTCPU_WEIGHT * \ | min((e), INVERSE_ESTCPU_WEIGHT * \ | ||||
| (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE - \ | (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE - \ | ||||
| (PRIO_MAX - PRIO_MIN) * NICE_WEIGHT) \ | (PRIO_MAX - PRIO_MIN) * NICE_WEIGHT) \ | ||||
| + INVERSE_ESTCPU_WEIGHT - 1) | + INVERSE_ESTCPU_WEIGHT - 1) | ||||
| #define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) | #define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) | ||||
| ▲ Show 20 Lines • Show All 1,798 Lines • Show Last 20 Lines | |||||