qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] Refactor numa mode setting
@ 2010-03-26 21:48 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2010-03-26 21:48 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 vl.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/vl.c b/vl.c
index f12363c..ca568b2 100644
--- a/vl.c
+++ b/vl.c
@@ -2927,6 +2927,20 @@ static bool tcg_cpu_exec(void)
     return tcg_has_work();
 }

+static void set_numa_modes(void)
+{
+    CPUState *env;
+    int i;
+
+    for (env = first_cpu; env != NULL; env = env->next_cpu) {
+        for (i = 0; i < nb_numa_nodes; i++) {
+            if (node_cpumask[i] & (1 << env->cpu_index)) {
+                env->numa_node = i;
+            }
+        }
+    }
+}
+
 static int vm_can_run(void)
 {
     if (powerdown_requested)
@@ -3735,7 +3749,6 @@ int main(int argc, char **argv, char **envp)
     const char *chroot_dir = NULL;
     const char *run_as = NULL;
 #endif
-    CPUState *env;
     int show_vnc_port = 0;
     int defconfig = 1;

@@ -4851,13 +4864,7 @@ int main(int argc, char **argv, char **envp)
     sighandler_setup();
 #endif

-    for (env = first_cpu; env != NULL; env = env->next_cpu) {
-        for (i = 0; i < nb_numa_nodes; i++) {
-            if (node_cpumask[i] & (1 << env->cpu_index)) {
-                env->numa_node = i;
-            }
-        }
-    }
+    set_numa_modes();

     current_machine = machine;

-- 
1.6.2.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-26 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 21:48 [Qemu-devel] [PATCH 1/2] Refactor numa mode setting Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).