-
Notifications
You must be signed in to change notification settings - Fork 5
/
param.h
118 lines (114 loc) · 3.72 KB
/
param.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#pragma once
#define NCPU 64 // maximum number of cpus
#define NPROC 64 // maximum number of processes
#define KSTACKSIZE 32768 // size of per-process kernel stack
#define NOFILE 450 // open files per process
#define NBUF 10000 // size of disk block cache
#define NINODE 5000 // maximum number of active i-nodes
#define NDEV 16 // maximum major device number
#define MAXARG 32 // max exec arguments
#define MAXARGLEN 256 // max exec argument length
#define MAXNAME 16 // max string names
#define UNIX_PATH_MAX 128
#define NEPOCH 4
#define CACHELINE 64 // cache line size
#define CPUKSTACKS (NPROC + NCPU*2)
#define VICTIMAGE 1000000 // cycles a proc executes before an eligible victim
#define PCID_HISTORY_SIZE 8 // number of past pgmap's to remember on each CPU
#define VERBOSE 0 // print kernel diagnostics
#define SPINLOCK_DEBUG DEBUG // Debug spin locks
#define RCU_TYPE_DEBUG DEBUG
#define LOCKSTAT DEBUG
#define ALLOC_MEMSET DEBUG
#define BUDDY_DEBUG DEBUG
#define CMDLINE_DEBUG DEBUG
#define REFCACHE_DEBUG DEBUG
#define RADIX_DEBUG DEBUG
#define SEQLOCK_DEBUG DEBUG
#define KSTACK_DEBUG DEBUG // use guard pages for over/underflow protection
#define USTACKPAGES 8
#define GCINTERVAL 10000 // max. time between GC runs (in msec)
#define GC_GLOBAL true
#define UART_BAUD 115200
#define PERFSIZE (128<<20ull)
#define DEBUG 0
// Physical page reference counting scheme. One of:
// :: for shared reference counters
// refcache:: for refcache counters
// locked_snzi:: for SNZI counters
#define PAGE_REFCOUNT refcache::
// The maximum number of recently freed pages to cache per core.
#define KALLOC_HOT_PAGES 128
// How to balance memory load. If 1, dynamically load balance pages
// between buddy allocators. If 0, directly steal and return memory
// from remote buddy allocators.
#define KALLOC_LOAD_BALANCE 0
// Buddy allocator granularity. If 0, create a buddy per NUMA node.
// If 1, create a buddy per CPU.
#define KALLOC_BUDDY_PER_CPU 1
// Whether or not to load balance in the scheduler.
#define SCHED_LOAD_BALANCE 0
// Reference counting scheme for inode's nlink. One of:
// :: for shared reference counters
// refcache:: for refcache counters
#define FS_NLINK_REFCOUNT refcache::
#define RANDOMIZE_KMALLOC 1
// Track kernel memory usage
#define KERNEL_HEAP_PROFILE 0
#define ENABLE_PARAVIRT 0
#define KERNEL_STRACE 0
#define STRACE_BINARY_NAME "lebench"
//
// QEMU-based targets
//
#if defined(HW_default)
#elif defined(HW_codex)
#define CODEX 1
//
// Physical hardware targets
//
#elif defined(HW_josmp)
#define E1000_PORT 1 // use second E1000 port
#elif defined(HW_ud0) || defined(HW_ud1)
#elif defined(HW_tom)
// tom's IPMI SOL console looses sync if we don't delay
#define UART_SEND_DELAY_USEC 1000
#define UART_BAUD 19200
#elif defined(HW_ben)
#define NCPU 80 // maximum number of CPUs
// Disable the hardware stream and adjacent cache line prefetcher
#define DISABLE_PREFETCH_STREAM 1
#define DISABLE_PREFETCH_ADJ 1
#elif defined(HW_bhw2)
#else
#error "Unknown HW"
#endif
#ifndef DEBUG
#define DEBUG 1
#endif
#ifndef CODEX
#define CODEX 0
#endif
#ifndef E1000_PORT
// Use E1000 port 0 by default
#define E1000_PORT 0
#endif
#ifndef TZ_SECS
// Local time zone in seconds west of UTC. Default to EDT.
#define TZ_SECS (4*60*60)
#endif
#ifndef RTC_TZ_SECS
// RTC timezone in seconds west of UTC. We assume the RTC is GMT by
// default. Also common is setting the RTC to local time, in which
// case this should be TZ_SECS.
#define RTC_TZ_SECS 0
#endif
#ifndef QUANTUM
#define QUANTUM 10 // scheduling time quantum and tick length (in msec)
#endif
#ifndef MEMIDE
#define MEMIDE 1
#endif
#ifndef AHCIIDE
#define AHCIIDE 1
#endif