From bf5681c0d73d68312c50be7468d08fca8e04fdc9 Mon Sep 17 00:00:00 2001 From: Tsachy Shacham <tsachy@google.com> Date: Thu, 15 Sep 2011 10:32:34 +0200 Subject: [PATCH] constants: support for CPU pinning under KVM Signed-off-by: Tsachy Shacham <tsachy@google.com> Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/constants.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/constants.py b/lib/constants.py index a1c70b2ec..524b698a8 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -104,6 +104,8 @@ CPU_PINNING_SEP = ":" CPU_PINNING_ALL = "all" # internal representation of "all" CPU_PINNING_ALL_VAL = -1 +# one "all" entry in a CPU list means CPU pinning is off +CPU_PINNING_OFF = [CPU_PINNING_ALL_VAL] # A Xen-specific implementation detail - there is no way to actually say # "use any cpu for pinning" in a Xen configuration file, as opposed to the @@ -114,6 +116,11 @@ CPU_PINNING_ALL_VAL = -1 # blackbox string that simply means use-any-cpu-for-pinning-under-xen. CPU_PINNING_ALL_XEN = "0-63" +# A KVM-specific implementation detail - the following value is used +# to set CPU affinity to all processors (#0 through #31), per taskset +# man page. +CPU_PINNING_ALL_KVM = 0xFFFFFFFF + # Wipe DD_CMD = "dd" WIPE_BLOCK_SIZE = 1024 ** 2 -- GitLab