tuned structure;
authorwenzelm
Mon, 06 Mar 2023 19:13:27 +0100
changeset 77549 6339c3a3720b
parent 77548 28b94fe1c00f
child 77550 ed2f53e1552c
tuned structure;
src/Pure/System/host.scala
--- a/src/Pure/System/host.scala	Mon Mar 06 19:09:17 2023 +0100
+++ b/src/Pure/System/host.scala	Mon Mar 06 19:13:27 2023 +0100
@@ -12,6 +12,19 @@
 
 
 object Host {
+  /* process policy via numactl tool */
+
+  def numactl(node: Int): String = "numactl -m" + node + " -N" + node
+  def numactl_ok(node: Int): Boolean = Isabelle_System.bash(numactl(node) + " true").ok
+
+  def process_policy(options: Options, numa_node: Option[Int]): Options =
+    numa_node match {
+      case None => options
+      case Some(node) =>
+        options.string("process_policy") = if (numactl_ok(node)) numactl(node) else ""
+    }
+
+
   /* allocated resources */
 
   object Node_Info { def none: Node_Info = Node_Info("", None) }
@@ -57,19 +70,6 @@
 
 
 
-  /* process policy via numactl tool */
-
-  def numactl(node: Int): String = "numactl -m" + node + " -N" + node
-  def numactl_ok(node: Int): Boolean = Isabelle_System.bash(numactl(node) + " true").ok
-
-  def process_policy(options: Options, numa_node: Option[Int]): Options =
-    numa_node match {
-      case None => options
-      case Some(node) =>
-        options.string("process_policy") = if (numactl_ok(node)) numactl(node) else ""
-    }
-
-
   /* shuffling of NUMA nodes */
 
   def numa_check(progress: Progress, enabled: Boolean): Boolean = {