Revision e0cd6f5d lib/constants.py
b/lib/constants.py | ||
---|---|---|
72 | 72 |
SSH_LOGIN_USER = _constants.SSH_LOGIN_USER |
73 | 73 |
SSH_CONSOLE_USER = _constants.SSH_CONSOLE_USER |
74 | 74 |
|
75 |
# cpu pinning separators and constants |
|
76 |
CPU_PINNING_SEP = ":" |
|
77 |
CPU_PINNING_ALL = "all" |
|
78 |
# internal representation of "all" |
|
79 |
CPU_PINNING_ALL_VAL = -1 |
|
80 |
# one "all" entry in a CPU list means CPU pinning is off |
|
81 |
CPU_PINNING_OFF = [CPU_PINNING_ALL_VAL] |
|
82 |
|
|
83 |
# A Xen-specific implementation detail - there is no way to actually say |
|
84 |
# "use any cpu for pinning" in a Xen configuration file, as opposed to the |
|
85 |
# command line, where you can say "xm vcpu-pin <domain> <vcpu> all". |
|
86 |
# The workaround used in Xen is "0-63" (see source code function |
|
87 |
# xm_vcpu_pin in <xen-source>/tools/python/xen/xm/main.py). |
|
88 |
# To support future changes, the following constant is treated as a |
|
89 |
# blackbox string that simply means use-any-cpu-for-pinning-under-xen. |
|
90 |
CPU_PINNING_ALL_XEN = "0-63" |
|
91 |
|
|
92 |
# A KVM-specific implementation detail - the following value is used |
|
93 |
# to set CPU affinity to all processors (#0 through #31), per taskset |
|
94 |
# man page. |
|
95 |
# FIXME: This only works for machines with up to 32 CPU cores |
|
96 |
CPU_PINNING_ALL_KVM = 0xFFFFFFFF |
|
97 |
|
|
98 |
# Wipe |
|
75 |
CPU_PINNING_SEP = _constants.CPU_PINNING_SEP |
|
76 |
CPU_PINNING_ALL = _constants.CPU_PINNING_ALL |
|
77 |
CPU_PINNING_ALL_VAL = _constants.CPU_PINNING_ALL_VAL |
|
78 |
CPU_PINNING_OFF = _constants.CPU_PINNING_OFF |
|
79 |
|
|
80 |
CPU_PINNING_ALL_XEN = _constants.CPU_PINNING_ALL_XEN |
|
81 |
|
|
82 |
CPU_PINNING_ALL_KVM = _constants.CPU_PINNING_ALL_KVM |
|
83 |
|
|
99 | 84 |
DD_CMD = _constants.DD_CMD |
100 | 85 |
MAX_WIPE_CHUNK = _constants.MAX_WIPE_CHUNK |
101 | 86 |
MIN_WIPE_CHUNK_PERCENT = _constants.MIN_WIPE_CHUNK_PERCENT |
Also available in: Unified diff