]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/KernelDevice: report numa info for each device
authorSage Weil <sage@redhat.com>
Thu, 3 Jan 2019 20:31:22 +0000 (14:31 -0600)
committerSage Weil <sage@redhat.com>
Fri, 4 Jan 2019 19:08:03 +0000 (13:08 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/KernelDevice.cc

index f2ab52e3603637c5b9a81809c37b6c8413b7187b..7008cad8115eea6a3cce57ac96d904f8dbedae06 100644 (file)
@@ -29,6 +29,7 @@
 #endif
 #include "common/debug.h"
 #include "common/align.h"
+#include "common/numa.h"
 
 #define dout_context cct
 #define dout_subsys ceph_subsys_bdev
@@ -305,6 +306,13 @@ int KernelDevice::collect_metadata(const string& prefix, map<string,string> *pm)
 
     if (blkdev.is_nvme())
       (*pm)[prefix + "type"] = "nvme";
+
+    // numa
+    int node;
+    r = blkdev.get_numa_node(&node);
+    if (r >= 0) {
+      (*pm)[prefix + "numa_node"] = stringify(node);
+    }
   } else {
     (*pm)[prefix + "access_mode"] = "file";
     (*pm)[prefix + "path"] = path;