Add support for cpus_allowed_policy
Two policies are supported:
shared cpumask is shared between all threads. This is the original
behavior.
split cpumask is split between threads, each thread gets a unique
CPU.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/os/os-solaris.h b/os/os-solaris.h
index e661211..7a0a3f0 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -111,6 +111,16 @@
return 0;
}
+static inline int fio_cpuset_count(os_cpu_mask_t *mask)
+{
+ unsigned int num_cpus;
+
+ if (pset_info(*mask, NULL, &num_cpus, NULL) < 0)
+ return 0;
+
+ return num_cpus;
+}
+
static inline int fio_cpuset_exit(os_cpu_mask_t *mask)
{
if (pset_destroy(*mask) < 0)