[go: up one dir, main page]

File: constants.h

package info (click to toggle)
irqbalance 1.1.0-2.3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,476 kB
  • ctags: 617
  • sloc: sh: 11,446; ansic: 3,460; makefile: 38
file content (33 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __INCLUDE_GUARD_CONSTANTS_H
#define __INCLUDE_GUARD_CONSTANTS_H

/* interval between rebalance attempts in seconds */
#define SLEEP_INTERVAL 10

#define NSEC_PER_SEC 1e9

/* NUMA topology refresh intervals, in units of SLEEP_INTERVAL */
#define NUMA_REFRESH_INTERVAL 32
/* NIC interrupt refresh interval, in units of SLEEP_INTERVAL */
#define NIC_REFRESH_INTERVAL 32

/* minimum number of interrupts since boot for an interrupt to matter */
#define MIN_IRQ_COUNT	20


/* balancing tunings */

#define CROSS_PACKAGE_PENALTY		3000
#define NUMA_PENALTY			500
#define POWER_MODE_PACKAGE_THRESHOLD 	20000
#define CLASS_VIOLATION_PENTALTY	6000
#define MSI_CACHE_PENALTY		10000
#define CORE_SPECIFIC_THRESHOLD		5000

/* power mode */

#define POWER_MODE_SOFTIRQ_THRESHOLD	20
#define POWER_MODE_HYSTERESIS		3


#endif